[format.range.fmtmap]

# 28 Text processing library [[text]](./#text)

## 28.5 Formatting [[format]](format#range.fmtmap)

### 28.5.7 Formatting of ranges [[format.range]](format.range#fmtmap)

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

[ð](#lib:range-default-formatter)

namespace std {template<ranges::[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") R, class charT>struct *range-default-formatter*<range_format::map, R, charT> {private:using *maybe-const-map* = *fmt-maybe-const*<R, charT>; // *exposition only*using *element-type* = // *exposition only* remove_cvref_t<ranges::range_reference_t<*maybe-const-map*>>;
 range_formatter<*element-type*, charT> *underlying_*; // *exposition only*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; };}

[ð](#lib:range-default-formatter,constructor)

`constexpr range-default-formatter();
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L8237)

*Mandates*: Either:

- [(1.1)](#1.1)

*element-type* is a specialization of pair, or

- [(1.2)](#1.2)

*element-type* is a specialization of tuple andtuple_size_v<*element-type*> == 2[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L8248)

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

[ð](#lib:parse,range-default-formatter)

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

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L8266)

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

[ð](#lib:format,range-default-formatter)

`template<class FormatContext>
  typename FormatContext::iterator
    format(maybe-const-map& r, FormatContext& ctx) const;
`

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L8279)

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