You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not clear for me from the docs if this test project is correct. What are the differences between fmt::formatter<const char*>, fmt::formatter<std::string_view>, fmt::formatter<std::string>? Can I include only fmt/core.h in headers (as in the second example here)? I thought the CE in fmt 10.2.1 (not on trunk) was related to this issue, but now I'm not sure.
The text was updated successfully, but these errors were encountered:
Those are specializations for different string types. I will investigate why your example doesn't work with std::string formatter but in the meantime you can use a formatter for fmt::string_view which works: https://godbolt.org/z/eo4Y7d7nP.
Documented the list of formatter specializations provided by fmt/base.h (which will superseed fmt/core.h): f30f1fd. In general it should be sufficient to use fmt::string_view but if you want a formatter of std::string for some reason you should include fmt/format.h.
It's not clear for me from the docs if this test project is correct. What are the differences between
fmt::formatter<const char*>
,fmt::formatter<std::string_view>
,fmt::formatter<std::string>
? Can I include onlyfmt/core.h
in headers (as in the second example here)? I thought the CE in fmt 10.2.1 (not on trunk) was related to this issue, but now I'm not sure.The text was updated successfully, but these errors were encountered: