[format.range.fmtmap] (original) (raw)

28 Text processing library [text]

28.5 Formatting [format]

28.5.7 Formatting of ranges [format.range]

28.5.7.4 Specialization of range-default-formatter for maps [format.range.fmtmap]

namespace std { template<ranges::input_range R, class charT> struct range-default-formatter<range_format::map, R, charT> { private: using maybe-const-map = fmt-maybe-const<R, charT>; using element-type = remove_cvref_t<ranges::range_reference_t<_maybe-const-map_>>; range_formatter<_element-type_, charT> underlying_; public: constexpr range-default-formatter();template<class ParseContext> constexpr typename ParseContext::iterator parse(ParseContext& ctx);template<class FormatContext> typename FormatContext::iterator format(maybe-const-map& r, FormatContext& ctx) const;};}

constexpr _range-default-formatter_();

Mandates: Either:

Effects: Equivalent to:underlying_.set_brackets(STATICALLY-WIDEN<charT>("{"), STATICALLY-WIDEN<charT>("}"));underlying_.underlying().set_brackets({}, {});underlying_.underlying().set_separator(STATICALLY-WIDEN<charT>(": "));

template<class ParseContext> constexpr typename ParseContext::iterator parse(ParseContext& ctx);

Effects: Equivalent to: return underlying_.parse(ctx);

template<class FormatContext> typename FormatContext::iterator format(_maybe-const-map_& r, FormatContext& ctx) const;

Effects: Equivalent to: return underlying_.format(r, ctx);