tmp/tmpybxv358l/{from.md → to.md}
RENAMED
|
@@ -9,12 +9,12 @@ namespace std {
|
|
| 9 |
};
|
| 10 |
|
| 11 |
template <class charT, bool International = false>
|
| 12 |
class moneypunct : public locale::facet, public money_base {
|
| 13 |
public:
|
| 14 |
-
|
| 15 |
-
|
| 16 |
|
| 17 |
explicit moneypunct(size_t refs = 0);
|
| 18 |
|
| 19 |
charT decimal_point() const;
|
| 20 |
charT thousands_sep() const;
|
|
@@ -46,11 +46,11 @@ namespace std {
|
|
| 46 |
|
| 47 |
The `moneypunct<>` facet defines monetary formatting parameters used by
|
| 48 |
`money_get<>` and `money_put<>`. A monetary format is a sequence of four
|
| 49 |
components, specified by a `pattern` value `p`, such that the `part`
|
| 50 |
value `static_cast<part>(p.field[i])` determines the `i`th component of
|
| 51 |
-
the format[^
|
| 52 |
`symbol`, `sign`, `value`, and either `space` or `none` appears exactly
|
| 53 |
once. The value `none`, if present, is not first; the value `space`, if
|
| 54 |
present, is neither first nor last.
|
| 55 |
|
| 56 |
Where `none` or `space` appears, white space is permitted in the format,
|
|
@@ -113,56 +113,56 @@ int frac_digits() const;
|
|
| 113 |
pattern pos_format() const;
|
| 114 |
pattern neg_format() const;
|
| 115 |
```
|
| 116 |
|
| 117 |
Each of these functions `F` returns the result of calling the
|
| 118 |
-
corresponding virtual member function `
|
| 119 |
|
| 120 |
##### `moneypunct` virtual functions <a id="locale.moneypunct.virtuals">[[locale.moneypunct.virtuals]]</a>
|
| 121 |
|
| 122 |
``` cpp
|
| 123 |
charT do_decimal_point() const;
|
| 124 |
```
|
| 125 |
|
| 126 |
*Returns:* The radix separator to use in case `do_frac_digits()` is
|
| 127 |
-
greater than zero.[^
|
| 128 |
|
| 129 |
``` cpp
|
| 130 |
charT do_thousands_sep() const;
|
| 131 |
```
|
| 132 |
|
| 133 |
*Returns:* The digit group separator to use in case `do_grouping()`
|
| 134 |
-
specifies a digit grouping pattern.[^
|
| 135 |
|
| 136 |
``` cpp
|
| 137 |
string do_grouping() const;
|
| 138 |
```
|
| 139 |
|
| 140 |
*Returns:* A pattern defined identically as, but not necessarily equal
|
| 141 |
-
to, the result of `numpunct<charT>::do_grouping()`.[^
|
| 142 |
|
| 143 |
``` cpp
|
| 144 |
string_type do_curr_symbol() const;
|
| 145 |
```
|
| 146 |
|
| 147 |
-
*Returns:* A string to use as the currency identifier symbol.[^
|
| 148 |
|
| 149 |
``` cpp
|
| 150 |
string_type do_positive_sign() const;
|
| 151 |
string_type do_negative_sign() const;
|
| 152 |
```
|
| 153 |
|
| 154 |
*Returns:* `do_positive_sign()` returns the string to use to indicate a
|
| 155 |
-
positive monetary value;[^
|
| 156 |
use to indicate a negative value.
|
| 157 |
|
| 158 |
``` cpp
|
| 159 |
int do_frac_digits() const;
|
| 160 |
```
|
| 161 |
|
| 162 |
*Returns:* The number of digits after the decimal radix separator, if
|
| 163 |
-
any.[^
|
| 164 |
|
| 165 |
``` cpp
|
| 166 |
pattern do_pos_format() const;
|
| 167 |
pattern do_neg_format() const;
|
| 168 |
```
|
|
@@ -170,7 +170,7 @@ pattern do_neg_format() const;
|
|
| 170 |
*Returns:* The specializations required in
|
| 171 |
Table [[tab:localization.required.specializations]] ([[locale.category]]),
|
| 172 |
namely `moneypunct<char>`, `moneypunct<wchar_t>`,
|
| 173 |
`moneypunct<char, true>`, and `moneypunct<wchar_t, true>`, return an
|
| 174 |
object of type `pattern` initialized to
|
| 175 |
-
`{ symbol, sign, none, value }`.[^
|
| 176 |
|
|
|
|
| 9 |
};
|
| 10 |
|
| 11 |
template <class charT, bool International = false>
|
| 12 |
class moneypunct : public locale::facet, public money_base {
|
| 13 |
public:
|
| 14 |
+
using char_type = charT;
|
| 15 |
+
using string_type = basic_string<charT>;
|
| 16 |
|
| 17 |
explicit moneypunct(size_t refs = 0);
|
| 18 |
|
| 19 |
charT decimal_point() const;
|
| 20 |
charT thousands_sep() const;
|
|
|
|
| 46 |
|
| 47 |
The `moneypunct<>` facet defines monetary formatting parameters used by
|
| 48 |
`money_get<>` and `money_put<>`. A monetary format is a sequence of four
|
| 49 |
components, specified by a `pattern` value `p`, such that the `part`
|
| 50 |
value `static_cast<part>(p.field[i])` determines the `i`th component of
|
| 51 |
+
the format[^21] In the `field` member of a `pattern` object, each value
|
| 52 |
`symbol`, `sign`, `value`, and either `space` or `none` appears exactly
|
| 53 |
once. The value `none`, if present, is not first; the value `space`, if
|
| 54 |
present, is neither first nor last.
|
| 55 |
|
| 56 |
Where `none` or `space` appears, white space is permitted in the format,
|
|
|
|
| 113 |
pattern pos_format() const;
|
| 114 |
pattern neg_format() const;
|
| 115 |
```
|
| 116 |
|
| 117 |
Each of these functions `F` returns the result of calling the
|
| 118 |
+
corresponding virtual member function `do_F()`.
|
| 119 |
|
| 120 |
##### `moneypunct` virtual functions <a id="locale.moneypunct.virtuals">[[locale.moneypunct.virtuals]]</a>
|
| 121 |
|
| 122 |
``` cpp
|
| 123 |
charT do_decimal_point() const;
|
| 124 |
```
|
| 125 |
|
| 126 |
*Returns:* The radix separator to use in case `do_frac_digits()` is
|
| 127 |
+
greater than zero.[^22]
|
| 128 |
|
| 129 |
``` cpp
|
| 130 |
charT do_thousands_sep() const;
|
| 131 |
```
|
| 132 |
|
| 133 |
*Returns:* The digit group separator to use in case `do_grouping()`
|
| 134 |
+
specifies a digit grouping pattern.[^23]
|
| 135 |
|
| 136 |
``` cpp
|
| 137 |
string do_grouping() const;
|
| 138 |
```
|
| 139 |
|
| 140 |
*Returns:* A pattern defined identically as, but not necessarily equal
|
| 141 |
+
to, the result of `numpunct<charT>::do_grouping()`.[^24]
|
| 142 |
|
| 143 |
``` cpp
|
| 144 |
string_type do_curr_symbol() const;
|
| 145 |
```
|
| 146 |
|
| 147 |
+
*Returns:* A string to use as the currency identifier symbol.[^25]
|
| 148 |
|
| 149 |
``` cpp
|
| 150 |
string_type do_positive_sign() const;
|
| 151 |
string_type do_negative_sign() const;
|
| 152 |
```
|
| 153 |
|
| 154 |
*Returns:* `do_positive_sign()` returns the string to use to indicate a
|
| 155 |
+
positive monetary value;[^26] `do_negative_sign()` returns the string to
|
| 156 |
use to indicate a negative value.
|
| 157 |
|
| 158 |
``` cpp
|
| 159 |
int do_frac_digits() const;
|
| 160 |
```
|
| 161 |
|
| 162 |
*Returns:* The number of digits after the decimal radix separator, if
|
| 163 |
+
any.[^27]
|
| 164 |
|
| 165 |
``` cpp
|
| 166 |
pattern do_pos_format() const;
|
| 167 |
pattern do_neg_format() const;
|
| 168 |
```
|
|
|
|
| 170 |
*Returns:* The specializations required in
|
| 171 |
Table [[tab:localization.required.specializations]] ([[locale.category]]),
|
| 172 |
namely `moneypunct<char>`, `moneypunct<wchar_t>`,
|
| 173 |
`moneypunct<char, true>`, and `moneypunct<wchar_t, true>`, return an
|
| 174 |
object of type `pattern` initialized to
|
| 175 |
+
`{ symbol, sign, none, value }`.[^28]
|
| 176 |
|