类模板
<locale>

std::numpunct

template <class charT> class numpunct;
数字标点符 (Numeric punctuation facet)

The numpunct standard facet provides information about the format of punctuation marks for numbers and also the strings to represent the true and false boolean values.

The numpunct class template has a protected destructor: Programs shall only construct objects of derived classes, or use those installed in locale objects (through use_facet).

All standard locale objects support at least the following facet instantiations of the numpunct class template as part of the numeric category
facets in locale objects描述
numpunct<char>narrow characters
numpunct<wchar_t>wide characters

模板参数

charT
字符类型。
This is the type of the representation, not the type of the numerical value: the formatting information is common for all numeric types.
Aliased as member char_type.

成员类型

成员类型定义描述
char_typeThe template parameter (charT)Character type
string_typebasic_string<charT>The type returned by members truename and falsename

成员常量

The class contains a public static constant of type locale::id that uniquely identifies facets with numpunct semantics.

公开成员函数


Numerical format


Boolean values


虚保护成员函数

The class defines the virtual protected members which implement the behavior by default of their respective member functions

Along with the class destructor

Specializations

At least the following specializations of this template are provided in all library implementations
特化
numpunct<char>
numpunct<wchar_t>