std::money_base
From cppreference.com
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Text processing library
Regular expressions library (C++11)
Formatting library (C++20)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++26)
Localization library
money_base
(C++11/17/26*)
(C++11/17/26*)
(C++11/17/26*)
(C++11/17/26*)
(C++11/17/26*)
(C++11/17/26*)
Defined in header
<locale>
class money_base;
The class std::money_base provides constants which are inherited and used by the std::moneypunct , std::money_get and std::money_put facets.
[edit] Member types
Type
Definition
enum part { none, space, symbol, sign, value };
unscoped enumeration type
struct pattern { char field[4]; };
the monetary format type
Enumeration constant
Definition
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 by moneypunct::curr_symbol is required
sign
the first of the characters returned by moneypunct::positive_sign or moneypunct::negative_sign is required
value
the absolute numeric monetary value is required
[edit] Notes
The monetary format is an array of four chars convertible to std::money_base::part
. In that sequence, each of symbol, sign, and value appears exactly once, and either space or none appears in the remaining position. The value none, if present, is not first; the value space, if present, is neither first nor last.
The default format, returned by the standard specializations of std::moneypunct is {symbol, sign, none, value}.
[edit] See also
defines monetary formatting parameters used by std::money_get and std::money_put
(class template) [edit]
(class template) [edit]