BasicFormatter is a type that abstracts formatting operations for a given formatting argument type and character type. Specializations of std::formatter
are required to meet the requirements of BasicFormatter.
A BasicFormatter is a Formatter if it is able to format both const and non-const arguments.
A type satisfies BasicFormatter if it is semiregular, meaning it satisfies:
And, given.
Arg
, a formatting argument type CharT
, a character type BasicFormatter
, a BasicFormatter type for types Arg
and CharT
OutputIt
, a LegacyOutputIterator type f
, a value of type (possibly const) BasicFormatter
g
, a value of type BasicFormatter
arg
, an lvalue of type Arg
ParseContext
, an alias of std::basic_format_parse_context<CharT>
FormatContext
, an alias of std::basic_format_context<OutputIt, CharT>
parse_ctx
, an lvalue of type ParseContext
format_ctx
, an lvalue of type FormatContext
Expression | Return type | Semantics |
---|---|---|
g.parse(parse_ctx) | ParseContext::iterator |
|
f.format(arg, format_ctx) | FormatContext::iterator |
|
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/named_req/BasicFormatter