[formatter.requirements]
Given character type charT, output iterator type Out, and formatting argument type T, in Table 112 and Table 113:
- f is a value of type (possibly const) F,
- g is an lvalue of type F,
- u is an lvalue of type T,
- t is a value of a type convertible to (possibly const) T,
- PC is basic_format_parse_context<charT>,
- FC is basic_format_context<Out, charT>,
- pc is an lvalue of type PC, and
- fc is an lvalue of type FC.
pc.begin() points to the beginning of the format-spec ([format.string]) of the replacement field being formatted in the format string.
If format-spec is not present or empty then either pc.begin() == pc.end() or *pc.begin() == '}'.
Table 112 — BasicFormatter requirements [tab:formatter.basic]
Parses format-spec ([format.string]) for type T in the range [pc.begin(), pc.end()) until the first unmatched character. Throws format_error unless the whole range is parsed or the unmatched character is }. Stores the parsed format specifiers in *this and returns an iterator past the end of the parsed range. | ||
Formats u according to the specifiers stored in *this, writes the output to fc.out(), and returns an iterator past the end of the output range. The output shall only depend on u, fc.locale(), fc.arg(n) for any value n of type size_t, and the range [pc.begin(), pc.end()) from the last call to f.parse(pc). |
Table 113 — Formatter requirements [tab:formatter]
Formats t according to the specifiers stored in *this, writes the output to fc.out(), and returns an iterator past the end of the output range. The output shall only depend on t, fc.locale(), fc.arg(n) for any value n of type size_t, and the range [pc.begin(), pc.end()) from the last call to f.parse(pc). | ||
As above, but does not modify u. |