|
fmt
|
The Formatter for T, the extension point for making a type formattable.
The primary template has a deleted default constructor, so an unspecialized type is not formattable. Specialize it with parse and format members, or derive from an existing Formatter:
template <> struct fmt::Formatter<my_type> {
constexpr auto parse(fmt::ParseContext<>& ctx) { return
ctx.begin(); } auto format(my_type v, fmt::Context& ctx) const { return fmt::formatTo(ctx.out(), "{}", v.value); } };
| T | the type to format. |
| Char | the character type. |