fmt
Loading...
Searching...
No Matches
fmt::RangeFormatter< T, Char, Enable > Struct Template Referenceexport

Detailed Description

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

A Formatter for ranges, writing the elements between brackets and separated by a separator.

Derive a Formatter specialization from this to format a custom range, and use set_separator, set_brackets and underlying to configure the output:

template <> struct fmt::Formatter<my_range>
    : fmt::RangeFormatter<int> {
  Formatter() { setBrackets("<", ">"); }
};
Template Parameters
Tthe element type, which must itself be formattable.
Charthe character type.
See also
join to write a range without brackets.

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