fmt
Loading...
Searching...
No Matches
fmt::Formatter< T, Char, Enable > Struct Template Referenceexport
module fmt
Inheritance diagram for fmt::Formatter< T, Char, Enable >:
fmt::BasicOstreamFormatter< char > fmt::Formatter< GroupDigitsView< T > >

Detailed Description

template<typename T, typename Char = char, typename Enable = void>
struct fmt::Formatter< T, Char, Enable >

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); } };

Template Parameters
Tthe type to format.
Charthe character type.

The documentation for this struct was generated from the following file:
  • /home/mccakit/desktop/mccakit-fmt/fmt/src/fmt/iface/base.cppm