| Localization library | |||||||||||||||||||||||||
| Regular expressions library(C++11) | |||||||||||||||||||||||||
| Formatting library(C++20) | |||||||||||||||||||||||||
| Null-terminated sequence utilities | |||||||||||||||||||||||||
| Byte strings | |||||||||||||||||||||||||
| Multibyte strings | |||||||||||||||||||||||||
| Wide strings | |||||||||||||||||||||||||
| Primitive numeric conversions | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| Text encoding identifications | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
Defined in header <locale> | ||
template<class CharT,bool International=false> class moneypunct; | ||
The facetstd::moneypunct encapsulates monetary value format preferences. Stream I/O manipulatorsstd::get_money andstd::put_money usestd::moneypunct throughstd::money_get andstd::money_put for parsing monetary value input and formatting monetary value output.
Inheritance diagram
Contents |
The standard library is guaranteed to provide the following specializations (they arerequired to be implemented by any locale object):
Defined in header <locale> | |
| std::moneypunct<char> | provides equivalents of the "C" locale preferences |
| std::moneypunct<wchar_t> | provides wide character equivalents of the "C" locale preferences |
| std::moneypunct<char,true> | provides equivalents of the "C" locale preferences, with international currency symbols |
| std::moneypunct<wchar_t,true> | provides wide character equivalents of the "C" locale preferences, with international currency symbols |
| Type | Definition |
char_type | CharT |
string_type | std::basic_string<CharT> |
| Member | Description |
std::locale::idid[static] | the identifier of thefacet |
constboolintl[static] | International |
constructs a newmoneypunct facet(public member function)[edit] | |
invokesdo_decimal_point(public member function)[edit] | |
invokesdo_thousands_sep(public member function)[edit] | |
invokesdo_grouping(public member function)[edit] | |
invokesdo_curr_symbol(public member function)[edit] | |
invokesdo_positive_sign ordo_negative_sign(public member function)[edit] | |
invokesdo_frac_digits(public member function)[edit] | |
invokesdo_pos_format/do_neg_format(public member function)[edit] |
destructs amoneypunct facet(protected member function)[edit] | |
[virtual] | provides the character to use as decimal point (virtual protected member function)[edit] |
[virtual] | provides the character to use as thousands separator (virtual protected member function)[edit] |
[virtual] | provides the numbers of digits between each pair of thousands separators (virtual protected member function)[edit] |
[virtual] | provides the string to use as the currency identifier (virtual protected member function)[edit] |
[virtual] | provides the string to indicate a positive or negative value (virtual protected member function)[edit] |
[virtual] | provides the number of digits to display after the decimal point (virtual protected member function)[edit] |
[virtual] | provides the formatting pattern for currency values (virtual protected member function)[edit] |
| Type | Definition |
| enum part{ none, space, symbol, sign, value}; | unscoped enumeration type |
| struct pattern{char field[4];}; | the monetary format type |
| Enumeration constant | Description |
none | whitespace is permitted but not required except in the last position, where whitespace is not permitted |
space | one or more whitespace characters are required |
symbol | the sequence of characters returned bystd::moneypunct::curr_symbol is required |
sign | the first of the characters returned bystd::moneypunct::positive_sign orstd::moneypunct::negative_sign is required |
value | the absolute numeric monetary value is required |
| defines monetary formatting patterns (class)[edit] | |
| represents the system-suppliedstd::moneypunct for the named locale (class template)[edit] | |
| parses and constructs a monetary value from an input character sequence (class template)[edit] | |
| formats a monetary value for output as a character sequence (class template)[edit] |