tmp/tmp9dcbfa8z/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Concept <a id="format.formattable">[[format.formattable]]</a>
|
| 2 |
+
|
| 3 |
+
Let `fmt-iter-for<charT>` be an unspecified type that models
|
| 4 |
+
`output_iterator<const charT&>` [[iterator.concept.output]].
|
| 5 |
+
|
| 6 |
+
``` cpp
|
| 7 |
+
template<class T, class Context,
|
| 8 |
+
class Formatter = typename Context::template formatter_type<remove_const_t<T>>>
|
| 9 |
+
concept formattable-with = // exposition only
|
| 10 |
+
semiregular<Formatter> &&
|
| 11 |
+
requires(Formatter& f, const Formatter& cf, T&& t, Context fc,
|
| 12 |
+
basic_format_parse_context<typename Context::char_type> pc)
|
| 13 |
+
{
|
| 14 |
+
{ f.parse(pc) } -> same_as<typename decltype(pc)::iterator>;
|
| 15 |
+
{ cf.format(t, fc) } -> same_as<typename Context::iterator>;
|
| 16 |
+
};
|
| 17 |
+
|
| 18 |
+
template<class T, class charT>
|
| 19 |
+
concept formattable =
|
| 20 |
+
formattable-with<remove_reference_t<T>, basic_format_context<fmt-iter-for<charT>>>;
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
A type `T` and a character type `charT` model `formattable` if
|
| 24 |
+
`formatter<remove_cvref_t<T>, charT>` meets the requirements
|
| 25 |
+
[[formatter.requirements]] and, if `remove_reference_t<T>` is
|
| 26 |
+
const-qualified, the requirements.
|
| 27 |
+
|