Each header that declares the template
formatter
provides the following enabled specializations:
- The specializations
template<> struct formatter<char, char>;
template<> struct formatter<char, wchar_t>;
template<> struct formatter<wchar_t, wchar_t>;
- For each charT,
the string type specializations
template<> struct formatter<charT*, charT>;
template<> struct formatter<const charT*, charT>;
template<size_t N> struct formatter<const charT[N], charT>;
template<class traits, class Allocator>
struct formatter<basic_string<charT, traits, Allocator>, charT>;
template<class traits>
struct formatter<basic_string_view<charT, traits>, charT>;
- For each charT,
for each cv-unqualified arithmetic type ArithmeticT
other than
char,
wchar_t,
char8_t,
char16_t, or
char32_t,
a specialization
template<> struct formatter<ArithmeticT, charT>;
- For each charT,
the pointer type specializations
template<> struct formatter<nullptr_t, charT>;
template<> struct formatter<void*, charT>;
template<> struct formatter<const void*, charT>;
The
parse member functions of these formatters
interpret the format specification
as a
std-format-spec
as described in
[format.string.std].