std::money_base
STD:钱[医]底座
Defined in header | | |
---|---|---|
class money_base; | | |
全班std::money_base
提供继承和使用的常量。std::moneypunct
,,,std::money_get
和std::money_put
面。
成员类型
Member type | Definition |
---|---|
enum part { none, space, symbol, sign, value }; | unscoped enumeration type |
struct pattern { char field4; }; | 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 |
注记
货币格式是由四个人组成的数组。char
S可转换为std::money_base::part
.在这个序列中,每一个symbol
,,,sign
,和value
只出现一次space
或none
出现在其余位置。价值none
,如果是存在的,则不是第一位的;space
如果存在,既不是第一,也不是最后。
的标准专门化返回的默认格式。std::moneypunct
是{symbol, sign, none, value}
另见
moneypunct | defines monetary formatting parameters used by std::money_get and std::money_put (class template) |
---|---|
money_get | parses and constructs a monetary value from an input character sequence (class template) |
money_put | formats a monetary value for output as a character sequence (class template) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。