C++ named requirements: BasicFormatter (since C++20)
From cppreference.com
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.
[edit] Requirements
A type satisfies BasicFormatter if it is semiregular, meaning it satisfies:
And, given the following types and values, the expressions shown in the table below are valid and have the indicated semantics:
Type | Definition |
CharT
|
a character type |
Arg
|
a formatting argument type |
Formatter
|
a Formatter type for types Arg and CharT
|
OutputIt
|
a LegacyOutputIterator type |
ParseCtx
|