-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 for 'std::variant' in C++17 #2941
Conversation
fd0cb68
to
78f27ac
Compare
My suggestions: Move |
For C++17, if all the alternatives of a variant are formattable the variant is now also formattable. In addition 'std::monostate' is now formattable. The value of a variant is enclosed in '<' and '>', and the monostate is formatted as ' '.
78f27ac
to
093630e
Compare
Thanks for the PR. This should definitely go to |
Moves implementation into 'std.h', and tests into 'std-test.cc'. Avoid fold-expression since MSVC was crashing. Hopefully works with this. Add secion for 'fmt/std.h' in API-docs.
ea9b804
to
60cd835
Compare
i rewrote |
Overall looks good but I'd suggest changing the default representation to |
If we can be verbose I would prefer to print |
Thank you! |
Quick variant implementation based on same machinery as tuple-formatting in #2940.
I just wanted to submit it to see if it was acceptable.