namespace std { template<class charT> class numpunct : public locale::facet { public: using char_type = charT; using string_type = basic_string<charT>; explicit numpunct(size_t refs = 0); char_type decimal_point() const; char_type thousands_sep() const; string grouping() const; string_type truename() const; string_type falsename() const; static locale::id id; protected: ~numpunct(); // virtual virtual char_type do_decimal_point() const; virtual char_type do_thousands_sep() const; virtual string do_grouping() const; virtual string_type do_truename() const; // for bool virtual string_type do_falsename() const; // for bool }; }
intval: sign units
sign: + -
units:
digits
digits thousands-sep units
digits: digit digitsand floating-point values have:
floatval: sign units fractional exponent sign decimal-point digits exponent
fractional: decimal-point digits
exponent: e sign digits
e: e Ewhere the number of digits between thousands-seps is as specified by do_grouping().
char_type decimal_point() const;
char_type thousands_sep() const;
string grouping() const;
string_type truename() const;
string_type falsename() const;
char_type do_decimal_point() const;
char_type do_thousands_sep() const;
string do_grouping() const;
string_type do_truename() const;
string_type do_falsename() const;
namespace std { template<class charT> class numpunct_byname : public numpunct<charT> { // this class is specialized for char and wchar_t. public: using char_type = charT; using string_type = basic_string<charT>; explicit numpunct_byname(const char*, size_t refs = 0); explicit numpunct_byname(const string&, size_t refs = 0); protected: ~numpunct_byname(); }; }