Closed Julien-Blanc-tgcm closed 2 years ago
I've added a fmtlib example for described structs/classes, which parallels the std::ostream
one. It didn't occur to me to add enum
support too. It's kind of trivial using enum_to_string
but not quite when the value doesn't have a name if we want to support all the string_view format specs. May be worth a second example.
A second fmtlib example, this one for enums, added.
Since the library provides a to_string / from_string method, it also makes sense that it provides integration with c++20 format library. Maybe at least as a sample in the documentation.
An example using libfmt (i currently don't have local access to a compiler with std::format support):