tmp/tmpulha2ph0/{from.md → to.md}
RENAMED
|
@@ -1,36 +1,30 @@
|
|
| 1 |
##### `num_put` virtual functions <a id="facet.num.put.virtuals">[[facet.num.put.virtuals]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
-
iter_type do_put(iter_type out, ios_base& str, char_type fill,
|
| 5 |
-
|
| 6 |
-
iter_type do_put(iter_type out, ios_base& str, char_type fill,
|
| 7 |
-
|
| 8 |
-
iter_type do_put(iter_type out, ios_base& str, char_type fill,
|
| 9 |
-
|
| 10 |
-
iter_type do_put(iter_type out, ios_base& str, char_type fill,
|
| 11 |
-
unsigned long long val) const;
|
| 12 |
-
iter_type do_put(iter_type out, ios_base& str, char_type fill,
|
| 13 |
-
double val) const;
|
| 14 |
-
iter_type do_put(iter_type out, ios_base& str, char_type fill,
|
| 15 |
-
long double val) const;
|
| 16 |
-
iter_type do_put(iter_type out, ios_base& str, char_type fill,
|
| 17 |
-
const void* val) const;
|
| 18 |
```
|
| 19 |
|
| 20 |
*Effects:* Writes characters to the sequence `out`, formatting `val` as
|
| 21 |
-
desired. In the following description, a local variable initialized
|
|
|
|
| 22 |
|
| 23 |
``` cpp
|
| 24 |
locale loc = str.getloc();
|
| 25 |
```
|
| 26 |
|
| 27 |
The details of this operation occur in several stages:
|
| 28 |
|
| 29 |
-
- Stage 1: Determine a printf conversion specifier `spec` and
|
| 30 |
-
|
| 31 |
-
|
| 32 |
``` cpp
|
| 33 |
printf(spec, val)
|
| 34 |
```
|
| 35 |
|
| 36 |
assuming that the current locale is the `"C"` locale.
|
|
@@ -55,10 +49,11 @@ fmtflags flags = str.flags() ;
|
|
| 55 |
fmtflags basefield = (flags & (ios_base::basefield));
|
| 56 |
fmtflags uppercase = (flags & (ios_base::uppercase));
|
| 57 |
fmtflags floatfield = (flags & (ios_base::floatfield));
|
| 58 |
fmtflags showpos = (flags & (ios_base::showpos));
|
| 59 |
fmtflags showbase = (flags & (ios_base::showbase));
|
|
|
|
| 60 |
```
|
| 61 |
|
| 62 |
All tables used in describing stage 1 are ordered. That is, the first
|
| 63 |
line whose condition is true applies. A line without a condition is the
|
| 64 |
default behavior when none of the earlier lines apply.
|
|
@@ -116,15 +111,15 @@ qualifiers prepended as indicated in
|
|
| 116 |
Table [[tab:localization.numeric.conversions]].
|
| 117 |
|
| 118 |
**Table: Numeric conversions** <a id="tab:localization.numeric.conversions">[tab:localization.numeric.conversions]</a>
|
| 119 |
|
| 120 |
| Type(s) | State | `stdio` equivalent |
|
| 121 |
-
| --------------------- | -----------
|
| 122 |
-
| an integral type | `
|
| 123 |
-
| | `
|
| 124 |
-
| a floating-point type | `
|
| 125 |
-
| | `
|
| 126 |
|
| 127 |
|
| 128 |
For conversion from a floating-point type, if
|
| 129 |
`floatfield != (ios_base::fixed | ios_base::scientific)`,
|
| 130 |
`str.precision()` is specified as precision in the conversion
|
|
@@ -160,11 +155,11 @@ A local variable is initialized as
|
|
| 160 |
|
| 161 |
``` cpp
|
| 162 |
fmtflags adjustfield = (flags & (ios_base::adjustfield));
|
| 163 |
```
|
| 164 |
|
| 165 |
-
The location of any padding[^
|
| 166 |
Table [[tab:localization.fill.padding]].
|
| 167 |
|
| 168 |
**Table: Fill padding** <a id="tab:localization.fill.padding">[tab:localization.fill.padding]</a>
|
| 169 |
|
| 170 |
| State | Location |
|
|
@@ -190,12 +185,11 @@ The sequence of `charT`’s at the end of stage 3 are output via
|
|
| 190 |
``` cpp
|
| 191 |
*out++ = c
|
| 192 |
```
|
| 193 |
|
| 194 |
``` cpp
|
| 195 |
-
iter_type do_put(iter_type out, ios_base& str, char_type fill,
|
| 196 |
-
bool val) const;
|
| 197 |
```
|
| 198 |
|
| 199 |
*Returns:* If `(str.flags() & ios_base::boolalpha) == 0` returns
|
| 200 |
`do_put(out, str, fill,`
|
| 201 |
`(int)val)`, otherwise obtains a string `s` as if by
|
|
|
|
| 1 |
##### `num_put` virtual functions <a id="facet.num.put.virtuals">[[facet.num.put.virtuals]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
iter_type do_put(iter_type out, ios_base& str, char_type fill, long val) const;
|
| 5 |
+
iter_type do_put(iter_type out, ios_base& str, char_type fill, long long val) const;
|
| 6 |
+
iter_type do_put(iter_type out, ios_base& str, char_type fill, unsigned long val) const;
|
| 7 |
+
iter_type do_put(iter_type out, ios_base& str, char_type fill, unsigned long long val) const;
|
| 8 |
+
iter_type do_put(iter_type out, ios_base& str, char_type fill, double val) const;
|
| 9 |
+
iter_type do_put(iter_type out, ios_base& str, char_type fill, long double val) const;
|
| 10 |
+
iter_type do_put(iter_type out, ios_base& str, char_type fill, const void* val) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
```
|
| 12 |
|
| 13 |
*Effects:* Writes characters to the sequence `out`, formatting `val` as
|
| 14 |
+
desired. In the following description, a local variable initialized
|
| 15 |
+
with:
|
| 16 |
|
| 17 |
``` cpp
|
| 18 |
locale loc = str.getloc();
|
| 19 |
```
|
| 20 |
|
| 21 |
The details of this operation occur in several stages:
|
| 22 |
|
| 23 |
+
- Stage 1: Determine a printf conversion specifier `spec` and determine
|
| 24 |
+
the characters that would be printed by `printf` ([[c.files]]) given
|
| 25 |
+
this conversion specifier for
|
| 26 |
``` cpp
|
| 27 |
printf(spec, val)
|
| 28 |
```
|
| 29 |
|
| 30 |
assuming that the current locale is the `"C"` locale.
|
|
|
|
| 49 |
fmtflags basefield = (flags & (ios_base::basefield));
|
| 50 |
fmtflags uppercase = (flags & (ios_base::uppercase));
|
| 51 |
fmtflags floatfield = (flags & (ios_base::floatfield));
|
| 52 |
fmtflags showpos = (flags & (ios_base::showpos));
|
| 53 |
fmtflags showbase = (flags & (ios_base::showbase));
|
| 54 |
+
fmtflags showpoint = (flags & (ios_base::showpoint));
|
| 55 |
```
|
| 56 |
|
| 57 |
All tables used in describing stage 1 are ordered. That is, the first
|
| 58 |
line whose condition is true applies. A line without a condition is the
|
| 59 |
default behavior when none of the earlier lines apply.
|
|
|
|
| 111 |
Table [[tab:localization.numeric.conversions]].
|
| 112 |
|
| 113 |
**Table: Numeric conversions** <a id="tab:localization.numeric.conversions">[tab:localization.numeric.conversions]</a>
|
| 114 |
|
| 115 |
| Type(s) | State | `stdio` equivalent |
|
| 116 |
+
| --------------------- | ----------- | ------------------ |
|
| 117 |
+
| an integral type | `showpos` | `+` |
|
| 118 |
+
| | `showbase` | `#` |
|
| 119 |
+
| a floating-point type | `showpos` | `+` |
|
| 120 |
+
| | `showpoint` | `#` |
|
| 121 |
|
| 122 |
|
| 123 |
For conversion from a floating-point type, if
|
| 124 |
`floatfield != (ios_base::fixed | ios_base::scientific)`,
|
| 125 |
`str.precision()` is specified as precision in the conversion
|
|
|
|
| 155 |
|
| 156 |
``` cpp
|
| 157 |
fmtflags adjustfield = (flags & (ios_base::adjustfield));
|
| 158 |
```
|
| 159 |
|
| 160 |
+
The location of any padding[^12] is determined according to
|
| 161 |
Table [[tab:localization.fill.padding]].
|
| 162 |
|
| 163 |
**Table: Fill padding** <a id="tab:localization.fill.padding">[tab:localization.fill.padding]</a>
|
| 164 |
|
| 165 |
| State | Location |
|
|
|
|
| 185 |
``` cpp
|
| 186 |
*out++ = c
|
| 187 |
```
|
| 188 |
|
| 189 |
``` cpp
|
| 190 |
+
iter_type do_put(iter_type out, ios_base& str, char_type fill, bool val) const;
|
|
|
|
| 191 |
```
|
| 192 |
|
| 193 |
*Returns:* If `(str.flags() & ios_base::boolalpha) == 0` returns
|
| 194 |
`do_put(out, str, fill,`
|
| 195 |
`(int)val)`, otherwise obtains a string `s` as if by
|