Name
moneypunct class template — Facet for punctuation of monetary values
Synopsis
template <typename charT, bool International = false> class moneypunct : public locale::facet, public money_base { public: typedef charT char_type; typedef basic_string<charT> string_type; explicit moneypunct(size_t refs = 0); charT decimal_point( ) const; charT thousands_sep( ) const; string grouping( ) const; string_type curr_symbol( ) const; string_type positive_sign( ) const; string_type negative_sign( ) const; int frac_digits( ) const; pattern pos_format( ) const; pattern neg_format( ) const; static locale::id id; static const bool intl = International; protected: virtual ~moneypunct( ); virtual charT do_decimal_point( ) const; virtual charT do_thousands_sep( ) const; virtual string do_grouping( ) const; virtual string_type do_curr_symbol( ) const; virtual string_type do_positive_sign( ) const; virtual string_type do_negative_sign( ) const; virtual int do_frac_digits( ) const; virtual pattern do_pos_format( ) const; virtual pattern do_neg_format( ) const; };
The moneypunct
class
template is a facet that describes the punctuation characters used
to format a monetary value.
The moneypunct<char,false>
, moneypunct<wchar_t,false>
, moneypunct<char,true>
, and moneypunct<wchar_t,true>
instantiations are standard.
Specify true
for the
International
template parameter
to obtain an international format, or false
to obtain a local format. In an international format, the currency symbol is always four characters, ...
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.