tmp/tmpytsz7zl3/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Specialization of *`range-default-formatter`* for maps <a id="format.range.fmtmap">[[format.range.fmtmap]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std {
|
| 5 |
+
template<ranges::input_range R, class charT>
|
| 6 |
+
struct range-default-formatter<range_format::map, R, charT> {
|
| 7 |
+
private:
|
| 8 |
+
using maybe-const-map = fmt-maybe-const<R, charT>; // exposition only
|
| 9 |
+
using element-type = // exposition only
|
| 10 |
+
remove_cvref_t<ranges::range_reference_t<maybe-const-map>>;
|
| 11 |
+
range_formatter<element-type, charT> underlying_; // exposition only
|
| 12 |
+
|
| 13 |
+
public:
|
| 14 |
+
constexpr range-default-formatter();
|
| 15 |
+
|
| 16 |
+
template<class ParseContext>
|
| 17 |
+
constexpr typename ParseContext::iterator
|
| 18 |
+
parse(ParseContext& ctx);
|
| 19 |
+
|
| 20 |
+
template<class FormatContext>
|
| 21 |
+
typename FormatContext::iterator
|
| 22 |
+
format(maybe-const-map& r, FormatContext& ctx) const;
|
| 23 |
+
};
|
| 24 |
+
}
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
``` cpp
|
| 28 |
+
constexpr range-default-formatter();
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
*Mandates:* Either:
|
| 32 |
+
|
| 33 |
+
- *element-type* is a specialization of `pair`, or
|
| 34 |
+
- *element-type* is a specialization of `tuple` and
|
| 35 |
+
`tuple_size_v<`*`element-type`*`> == 2`.
|
| 36 |
+
|
| 37 |
+
*Effects:* Equivalent to:
|
| 38 |
+
|
| 39 |
+
``` cpp
|
| 40 |
+
underlying_.set_brackets(STATICALLY-WIDEN<charT>("{"), STATICALLY-WIDEN<charT>("}"));
|
| 41 |
+
underlying_.underlying().set_brackets({}, {});
|
| 42 |
+
underlying_.underlying().set_separator(STATICALLY-WIDEN<charT>(": "));
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
``` cpp
|
| 46 |
+
template<class ParseContext>
|
| 47 |
+
constexpr typename ParseContext::iterator
|
| 48 |
+
parse(ParseContext& ctx);
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
*Effects:* Equivalent to: `return `*`underlying_`*`.parse(ctx);`
|
| 52 |
+
|
| 53 |
+
``` cpp
|
| 54 |
+
template<class FormatContext>
|
| 55 |
+
typename FormatContext::iterator
|
| 56 |
+
format(maybe-const-map& r, FormatContext& ctx) const;
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
*Effects:* Equivalent to: `return `*`underlying_`*`.format(r, ctx);`
|
| 60 |
+
|