Standard C++ Library Reference ISO/IEC (VERSION3)

to monetary values.
As with any locale facet, the static object id has an initial stored value of zero. The first attempt to access its stored
value stores a unique positive value in id.
money_get::char_type
typedef Elem char_type;
The type is a synonym for the template parameter Elem.
money_get::do_get
virtual iter_type do_get(iter_type first, iter_type last,
bool intl, ios_base& iosbase, ios_base::iostate& state,
string_type& val) const;
virtual iter_type do_get(iter_type first, iter_type last,
bool intl, ios_base& iosbase, ios_base::iostate& state,
long double& val) const;
The first virtual protected member function endeavors to match sequential elements beginning at first in the sequence
[first, last) until it has recognized a complete, nonempty monetary input field. If successful, it converts this
field to a sequence of one or more decimal digits, optionally preceded by a minus sign (-), to represent the amount and
stores the result in the string_type object val. It returns an iterator designating the first element beyond the
monetary input field. Otherwise, the function stores an empty sequence in val and sets ios_base::failbit in
state. It returns an iterator designating the first element beyond any prefix of a valid monetary input field. In either
case, if the return value equals last, the function sets ios_base::eofbit in state.
The second virtual protected member function behaves the same as the first, except that if successful it converts the
optionally-signed digit sequence to a value of type long double and stores that value in val.
The format of a monetary input field is determined by the locale facet fac returned by the (effective) call use_facet
<moneypunct<Elem, intl> >(iosbase. getloc()). Specifically:
fac.neg_format() determines the order in which components of the field occur.
fac.curr_symbol() determines the sequence of elements that constitutes a currency symbol.
fac.positive_sign() determines the sequence of elements that constitutes a positive sign.
fac.negative_sign() determines the sequence of elements that constitutes a negative sign.
fac.grouping() determines how digits are grouped to the left of any decimal point.
fac.thousands_sep() determines the element that separates groups of digits to the left of any decimal point.
fac.decimal_point() determines the element that separates the integer digits from the fraction digits.
fac.frac_digits() determines the number of significant fraction digits to the right of any decimal point.
If the sign string (fac.negative_sign or fac.positive_sign) has more than one element, only the first
element is matched where the element equal to money_base::sign appears in the format pattern
(fac.neg_format). Any remaining elements are matched at the end of the monetary input field. If neither string has
a first element that matches the next element in the monetary input field, the sign string is taken as empty and the sign is
positive.
If iosbase.flags() & showbase is nonzero, the string fac.curr_symbol must match where the element
equal to money_base::symbol appears in the format pattern. Otherwise, if money_base::symbol occurs at the
end of the format pattern, and if no elements of the sign string remain to be matched, the currency symbol is not
matched. Otherwise, the currency symbol is optionally matched.
If no instances of fac.thousands_sep() occur in the value portion of the monetary input field (where the element
equal to money_base::value appears in the format pattern), no grouping constraint is imposed. Otherwise, any