tmp/tmpdm19ypia/{from.md → to.md}
RENAMED
|
@@ -1,14 +1,12 @@
|
|
| 1 |
-
#####
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
-
iter_type do_get(iter_type s, iter_type end, bool intl,
|
| 5 |
-
ios_base
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
ios_base& str, ios_base::iostate& err,
|
| 9 |
-
string_type& digits) const;
|
| 10 |
```
|
| 11 |
|
| 12 |
*Effects:* Reads characters from `s` to parse and construct a monetary
|
| 13 |
value according to the format specified by a `moneypunct<charT, Intl>`
|
| 14 |
facet reference `mp` and the character mapping specified by a
|
|
@@ -18,11 +16,11 @@ does not change `err`; otherwise, sets `err` to `(err|str.failbit)`, or
|
|
| 18 |
`(err|str.failbit|str.eofbit)` if no more characters are available, and
|
| 19 |
does not change `units` or `digits`. Uses the pattern returned by
|
| 20 |
`mp.neg_format()` to parse all values. The result is returned as an
|
| 21 |
integral value stored in `units` or as a sequence of digits possibly
|
| 22 |
preceded by a minus sign (as produced by `ct.widen(c)` where `c` is
|
| 23 |
-
`’-’` or in the range from `’0’` through `’9’`
|
| 24 |
`digits`.
|
| 25 |
|
| 26 |
[*Example 1*: The sequence `$1,056.23` in a common United States locale
|
| 27 |
would yield, for `units`, `105623`, or, for `digits`,
|
| 28 |
`"105623"`. — *end example*]
|
|
@@ -37,13 +35,13 @@ Where `money_base::space` or `money_base::none` appears as the last
|
|
| 37 |
element in the format pattern, no white space is consumed. Otherwise,
|
| 38 |
where `money_base::space` appears in any of the initial elements of the
|
| 39 |
format pattern, at least one white space character is required. Where
|
| 40 |
`money_base::none` appears in any of the initial elements of the format
|
| 41 |
pattern, white space is allowed but not required. If
|
| 42 |
-
`(str.flags() & str.showbase)` is false, the currency symbol is
|
| 43 |
-
and is consumed only if other characters are needed to complete
|
| 44 |
-
format; otherwise, the currency symbol is required.
|
| 45 |
|
| 46 |
If the first character (if any) in the string `pos` returned by
|
| 47 |
`mp.positive_sign()` or the string `neg` returned by
|
| 48 |
`mp.negative_sign()` is recognized in the position indicated by `sign`
|
| 49 |
in the format pattern, it is consumed and any remaining characters in
|
|
|
|
| 1 |
+
##### Virtual functions <a id="locale.money.get.virtuals">[[locale.money.get.virtuals]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
iter_type do_get(iter_type s, iter_type end, bool intl, ios_base& str,
|
| 5 |
+
ios_base::iostate& err, long double& units) const;
|
| 6 |
+
iter_type do_get(iter_type s, iter_type end, bool intl, ios_base& str,
|
| 7 |
+
ios_base::iostate& err, string_type& digits) const;
|
|
|
|
|
|
|
| 8 |
```
|
| 9 |
|
| 10 |
*Effects:* Reads characters from `s` to parse and construct a monetary
|
| 11 |
value according to the format specified by a `moneypunct<charT, Intl>`
|
| 12 |
facet reference `mp` and the character mapping specified by a
|
|
|
|
| 16 |
`(err|str.failbit|str.eofbit)` if no more characters are available, and
|
| 17 |
does not change `units` or `digits`. Uses the pattern returned by
|
| 18 |
`mp.neg_format()` to parse all values. The result is returned as an
|
| 19 |
integral value stored in `units` or as a sequence of digits possibly
|
| 20 |
preceded by a minus sign (as produced by `ct.widen(c)` where `c` is
|
| 21 |
+
`’-’` or in the range from `’0’` through `’9’` (inclusive)) stored in
|
| 22 |
`digits`.
|
| 23 |
|
| 24 |
[*Example 1*: The sequence `$1,056.23` in a common United States locale
|
| 25 |
would yield, for `units`, `105623`, or, for `digits`,
|
| 26 |
`"105623"`. — *end example*]
|
|
|
|
| 35 |
element in the format pattern, no white space is consumed. Otherwise,
|
| 36 |
where `money_base::space` appears in any of the initial elements of the
|
| 37 |
format pattern, at least one white space character is required. Where
|
| 38 |
`money_base::none` appears in any of the initial elements of the format
|
| 39 |
pattern, white space is allowed but not required. If
|
| 40 |
+
`(str.flags() & str.showbase)` is `false`, the currency symbol is
|
| 41 |
+
optional and is consumed only if other characters are needed to complete
|
| 42 |
+
the format; otherwise, the currency symbol is required.
|
| 43 |
|
| 44 |
If the first character (if any) in the string `pos` returned by
|
| 45 |
`mp.positive_sign()` or the string `neg` returned by
|
| 46 |
`mp.negative_sign()` is recognized in the position indicated by `sign`
|
| 47 |
in the format pattern, it is consumed and any remaining characters in
|