tmp/tmpyjbojbvp/{from.md → to.md}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
-
#### Class template `moneypunct` <a id="locale.moneypunct">[[locale.moneypunct]]</a>
|
| 2 |
|
| 3 |
-
##### General <a id="locale.moneypunct.general">[[locale.moneypunct.general]]</a>
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
namespace std {
|
| 7 |
class money_base {
|
| 8 |
public:
|
|
@@ -48,11 +48,11 @@ namespace std {
|
|
| 48 |
|
| 49 |
The `moneypunct<>` facet defines monetary formatting parameters used by
|
| 50 |
`money_get<>` and `money_put<>`. A monetary format is a sequence of four
|
| 51 |
components, specified by a `pattern` value `p`, such that the `part`
|
| 52 |
value `static_cast<part>(p.field[i])` determines the `i`ᵗʰ component of
|
| 53 |
-
the format[^
|
| 54 |
|
| 55 |
In the `field` member of a `pattern` object, each value `symbol`,
|
| 56 |
`sign`, `value`, and either `space` or `none` appears exactly once. The
|
| 57 |
value `none`, if present, is not first; the value `space`, if present,
|
| 58 |
is neither first nor last.
|
|
@@ -115,11 +115,11 @@ by `frac_digits()`.
|
|
| 115 |
|
| 116 |
The placement of thousands-separator characters (if any) is determined
|
| 117 |
by the value returned by `grouping()`, defined identically as the member
|
| 118 |
`numpunct<>::do_grouping()`.
|
| 119 |
|
| 120 |
-
##### Members <a id="locale.moneypunct.members">[[locale.moneypunct.members]]</a>
|
| 121 |
|
| 122 |
``` cpp
|
| 123 |
charT decimal_point() const;
|
| 124 |
charT thousands_sep() const;
|
| 125 |
string grouping() const;
|
|
@@ -132,60 +132,60 @@ pattern neg_format() const;
|
|
| 132 |
```
|
| 133 |
|
| 134 |
Each of these functions `F` returns the result of calling the
|
| 135 |
corresponding virtual member function `do_F()`.
|
| 136 |
|
| 137 |
-
##### Virtual functions <a id="locale.moneypunct.virtuals">[[locale.moneypunct.virtuals]]</a>
|
| 138 |
|
| 139 |
``` cpp
|
| 140 |
charT do_decimal_point() const;
|
| 141 |
```
|
| 142 |
|
| 143 |
*Returns:* The radix separator to use in case `do_frac_digits()` is
|
| 144 |
-
greater than zero.[^
|
| 145 |
|
| 146 |
``` cpp
|
| 147 |
charT do_thousands_sep() const;
|
| 148 |
```
|
| 149 |
|
| 150 |
*Returns:* The digit group separator to use in case `do_grouping()`
|
| 151 |
-
specifies a digit grouping pattern.[^
|
| 152 |
|
| 153 |
``` cpp
|
| 154 |
string do_grouping() const;
|
| 155 |
```
|
| 156 |
|
| 157 |
*Returns:* A pattern defined identically as, but not necessarily equal
|
| 158 |
-
to, the result of `numpunct<charT>::do_grouping()`.[^
|
| 159 |
|
| 160 |
``` cpp
|
| 161 |
string_type do_curr_symbol() const;
|
| 162 |
```
|
| 163 |
|
| 164 |
*Returns:* A string to use as the currency identifier symbol.
|
| 165 |
|
| 166 |
-
[*Note
|
| 167 |
`true`, this is typically four characters long: a three-letter code as
|
| 168 |
specified by ISO 4217 followed by a space. — *end note*]
|
| 169 |
|
| 170 |
``` cpp
|
| 171 |
string_type do_positive_sign() const;
|
| 172 |
string_type do_negative_sign() const;
|
| 173 |
```
|
| 174 |
|
| 175 |
*Returns:* `do_positive_sign()` returns the string to use to indicate a
|
| 176 |
-
positive monetary value;[^
|
| 177 |
|
| 178 |
`do_negative_sign()` returns the string to use to indicate a negative
|
| 179 |
value.
|
| 180 |
|
| 181 |
``` cpp
|
| 182 |
int do_frac_digits() const;
|
| 183 |
```
|
| 184 |
|
| 185 |
*Returns:* The number of digits after the decimal radix separator, if
|
| 186 |
-
any.[^
|
| 187 |
|
| 188 |
``` cpp
|
| 189 |
pattern do_pos_format() const;
|
| 190 |
pattern do_neg_format() const;
|
| 191 |
```
|
|
@@ -197,7 +197,7 @@ pattern do_neg_format() const;
|
|
| 197 |
- `moneypunct<wchar_t>`,
|
| 198 |
- `moneypunct<char, true>`, and
|
| 199 |
- `moneypunct<wchar_t, true>`,
|
| 200 |
|
| 201 |
return an object of type `pattern` initialized to
|
| 202 |
-
`{ symbol, sign, none, value }`.[^
|
| 203 |
|
|
|
|
| 1 |
+
##### Class template `moneypunct` <a id="locale.moneypunct">[[locale.moneypunct]]</a>
|
| 2 |
|
| 3 |
+
###### General <a id="locale.moneypunct.general">[[locale.moneypunct.general]]</a>
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
namespace std {
|
| 7 |
class money_base {
|
| 8 |
public:
|
|
|
|
| 48 |
|
| 49 |
The `moneypunct<>` facet defines monetary formatting parameters used by
|
| 50 |
`money_get<>` and `money_put<>`. A monetary format is a sequence of four
|
| 51 |
components, specified by a `pattern` value `p`, such that the `part`
|
| 52 |
value `static_cast<part>(p.field[i])` determines the `i`ᵗʰ component of
|
| 53 |
+
the format.[^18]
|
| 54 |
|
| 55 |
In the `field` member of a `pattern` object, each value `symbol`,
|
| 56 |
`sign`, `value`, and either `space` or `none` appears exactly once. The
|
| 57 |
value `none`, if present, is not first; the value `space`, if present,
|
| 58 |
is neither first nor last.
|
|
|
|
| 115 |
|
| 116 |
The placement of thousands-separator characters (if any) is determined
|
| 117 |
by the value returned by `grouping()`, defined identically as the member
|
| 118 |
`numpunct<>::do_grouping()`.
|
| 119 |
|
| 120 |
+
###### Members <a id="locale.moneypunct.members">[[locale.moneypunct.members]]</a>
|
| 121 |
|
| 122 |
``` cpp
|
| 123 |
charT decimal_point() const;
|
| 124 |
charT thousands_sep() const;
|
| 125 |
string grouping() const;
|
|
|
|
| 132 |
```
|
| 133 |
|
| 134 |
Each of these functions `F` returns the result of calling the
|
| 135 |
corresponding virtual member function `do_F()`.
|
| 136 |
|
| 137 |
+
###### Virtual functions <a id="locale.moneypunct.virtuals">[[locale.moneypunct.virtuals]]</a>
|
| 138 |
|
| 139 |
``` cpp
|
| 140 |
charT do_decimal_point() const;
|
| 141 |
```
|
| 142 |
|
| 143 |
*Returns:* The radix separator to use in case `do_frac_digits()` is
|
| 144 |
+
greater than zero.[^19]
|
| 145 |
|
| 146 |
``` cpp
|
| 147 |
charT do_thousands_sep() const;
|
| 148 |
```
|
| 149 |
|
| 150 |
*Returns:* The digit group separator to use in case `do_grouping()`
|
| 151 |
+
specifies a digit grouping pattern.[^20]
|
| 152 |
|
| 153 |
``` cpp
|
| 154 |
string do_grouping() const;
|
| 155 |
```
|
| 156 |
|
| 157 |
*Returns:* A pattern defined identically as, but not necessarily equal
|
| 158 |
+
to, the result of `numpunct<charT>::do_grouping()`.[^21]
|
| 159 |
|
| 160 |
``` cpp
|
| 161 |
string_type do_curr_symbol() const;
|
| 162 |
```
|
| 163 |
|
| 164 |
*Returns:* A string to use as the currency identifier symbol.
|
| 165 |
|
| 166 |
+
[*Note 2*: For specializations where the second template parameter is
|
| 167 |
`true`, this is typically four characters long: a three-letter code as
|
| 168 |
specified by ISO 4217 followed by a space. — *end note*]
|
| 169 |
|
| 170 |
``` cpp
|
| 171 |
string_type do_positive_sign() const;
|
| 172 |
string_type do_negative_sign() const;
|
| 173 |
```
|
| 174 |
|
| 175 |
*Returns:* `do_positive_sign()` returns the string to use to indicate a
|
| 176 |
+
positive monetary value;[^22]
|
| 177 |
|
| 178 |
`do_negative_sign()` returns the string to use to indicate a negative
|
| 179 |
value.
|
| 180 |
|
| 181 |
``` cpp
|
| 182 |
int do_frac_digits() const;
|
| 183 |
```
|
| 184 |
|
| 185 |
*Returns:* The number of digits after the decimal radix separator, if
|
| 186 |
+
any.[^23]
|
| 187 |
|
| 188 |
``` cpp
|
| 189 |
pattern do_pos_format() const;
|
| 190 |
pattern do_neg_format() const;
|
| 191 |
```
|
|
|
|
| 197 |
- `moneypunct<wchar_t>`,
|
| 198 |
- `moneypunct<char, true>`, and
|
| 199 |
- `moneypunct<wchar_t, true>`,
|
| 200 |
|
| 201 |
return an object of type `pattern` initialized to
|
| 202 |
+
`{ symbol, sign, none, value }`.[^24]
|
| 203 |
|