tmp/tmphx11nr1_/{from.md → to.md}
RENAMED
|
@@ -1,24 +1,27 @@
|
|
| 1 |
#### Formatter requirements <a id="formatter.requirements">[[formatter.requirements]]</a>
|
| 2 |
|
| 3 |
-
A type `F` meets the requirements if
|
| 4 |
|
| 5 |
-
- it meets the
|
| 6 |
- *Cpp17DefaultConstructible* ([[cpp17.defaultconstructible]]),
|
| 7 |
- *Cpp17CopyConstructible* ([[cpp17.copyconstructible]]),
|
| 8 |
-
|
|
|
|
| 9 |
- *Cpp17Destructible* ([[cpp17.destructible]])
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
| 15 |
|
| 16 |
Given character type `charT`, output iterator type `Out`, and formatting
|
| 17 |
-
argument type `T`, in [[formatter]]:
|
| 18 |
|
| 19 |
-
- `f` is a value of type `F`,
|
|
|
|
| 20 |
- `u` is an lvalue of type `T`,
|
| 21 |
- `t` is a value of a type convertible to (possibly const) `T`,
|
| 22 |
- `PC` is `basic_format_parse_context<charT>`,
|
| 23 |
- `FC` is `basic_format_context<Out, charT>`,
|
| 24 |
- `pc` is an lvalue of type `PC`, and
|
|
@@ -30,5 +33,13 @@ string. If *format-spec* is empty then either `pc.begin() == pc.end()`
|
|
| 30 |
or `*pc.begin() == '}'`.
|
| 31 |
|
| 32 |
[*Note 1*: This allows formatters to emit meaningful error
|
| 33 |
messages. — *end note*]
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
#### Formatter requirements <a id="formatter.requirements">[[formatter.requirements]]</a>
|
| 2 |
|
| 3 |
+
A type `F` meets the requirements if it meets the
|
| 4 |
|
|
|
|
| 5 |
- *Cpp17DefaultConstructible* ([[cpp17.defaultconstructible]]),
|
| 6 |
- *Cpp17CopyConstructible* ([[cpp17.copyconstructible]]),
|
| 7 |
+
- *Cpp17CopyAssignable* ([[cpp17.copyassignable]]),
|
| 8 |
+
- *Cpp17Swappable* [[swappable.requirements]], and
|
| 9 |
- *Cpp17Destructible* ([[cpp17.destructible]])
|
| 10 |
|
| 11 |
+
requirements, and the expressions shown in [[formatter.basic]] are valid
|
| 12 |
+
and have the indicated semantics.
|
| 13 |
+
|
| 14 |
+
A type `F` meets the requirements if it meets the requirements and the
|
| 15 |
+
expressions shown in [[formatter]] are valid and have the indicated
|
| 16 |
+
semantics.
|
| 17 |
|
| 18 |
Given character type `charT`, output iterator type `Out`, and formatting
|
| 19 |
+
argument type `T`, in [[formatter.basic]] and [[formatter]]:
|
| 20 |
|
| 21 |
+
- `f` is a value of type (possibly const) `F`,
|
| 22 |
+
- `g` is an lvalue of type `F`,
|
| 23 |
- `u` is an lvalue of type `T`,
|
| 24 |
- `t` is a value of a type convertible to (possibly const) `T`,
|
| 25 |
- `PC` is `basic_format_parse_context<charT>`,
|
| 26 |
- `FC` is `basic_format_context<Out, charT>`,
|
| 27 |
- `pc` is an lvalue of type `PC`, and
|
|
|
|
| 33 |
or `*pc.begin() == '}'`.
|
| 34 |
|
| 35 |
[*Note 1*: This allows formatters to emit meaningful error
|
| 36 |
messages. — *end note*]
|
| 37 |
|
| 38 |
+
**Table: \newoldconcept{Formatter} requirements** <a id="formatter">[formatter]</a>
|
| 39 |
+
|
| 40 |
+
| Expression | Return type | Requirement |
|
| 41 |
+
| ----------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 42 |
+
| `f.format(t, fc)` | `FC::iterator` | 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)`. |
|
| 43 |
+
| `f.format(u, fc)` | `FC::iterator` | As above, but does not modify `u`. |
|
| 44 |
+
|
| 45 |
+
|