在线文档教程
C++
本土化 | Localizations

std::money_base

STD:钱[医]底座

Defined in header
class money_base;

全班std::money_base提供继承和使用的常量。std::moneypunct,,,std::money_getstd::money_put面。

成员类型

Member typeDefinition
enum part { none, space, symbol, sign, value };unscoped enumeration type
struct pattern { char field4; };the monetary format type

Enumeration constantDefinition
nonewhitespace is permitted but not required except in the last position, where whitespace is not permitted
spaceone or more whitespace characters are required
symbolthe sequence of characters returned by moneypunct::curr_symbol is required
signthe first of the characters returned by moneypunct::positive_sign or moneypunct::negative_sign is required
valuethe absolute numeric monetary value is required

注记

货币格式是由四个人组成的数组。charS可转换为std::money_base::part.在这个序列中,每一个symbol,,,sign,和value只出现一次spacenone出现在其余位置。价值none,如果是存在的,则不是第一位的;space如果存在,既不是第一,也不是最后。

的标准专门化返回的默认格式。std::moneypunct{symbol, sign, none, value}

另见

moneypunctdefines monetary formatting parameters used by std::money_get and std::money_put (class template)
money_getparses and constructs a monetary value from an input character sequence (class template)
money_putformats a monetary value for output as a character sequence (class template)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/locale/Money[医]底座