Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support formatting std::expected<void, E> #4148

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

phprus
Copy link
Contributor

@phprus phprus commented Sep 3, 2024

Fix for issue #4145.

Requires #4151. With #4151 we can remove temporary CI commit.

is_formattable<E, Char>::value>> {
struct formatter<
std::expected<T, E>, Char,
std::enable_if_t<detail::is_expected_formattable<T, Char>::value &&
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can not use:

std::is_void<T>::value || is_formattable<T, Char>::value

since is_formattable<void, Char>::value give compile-time error.

@vitaut

Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_formattable now works with void so let's remove is_expected_formattable.

@phprus phprus marked this pull request as ready for review September 4, 2024 15:57
@vitaut vitaut merged commit 22d50c1 into fmtlib:master Sep 4, 2024
45 checks passed
@vitaut
Copy link
Contributor

vitaut commented Sep 4, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants