public member type

std::moneypunct::pattern

<locale>
struct pattern;
Pattern type
This member type is inherited from money_base.

It is a data structure containing a pattern describing the format of a monetary expression. The pattern contains four fields, which are represented by an array of four char elements called field:

 
struct pattern { char field[4]; };


It is designed to contain four format specifiers (fields) with values defined in the enum type moneypunct::part.

Each field shall expand in the same order as it appears in the array into some part of a monetary expression. The possible values of each field element is one of the following member enum labels:

valueexpands tonotes
noneNothingCannot be the first specifier.
spaceWhite space (at least one, may expand to more)Cannot be the first or last specifier.
symbolCurrency symbol, as returned by moneypunct::curr_symbol
signSign (either moneypunct::positive_sign or moneypunct::negative_sign)
If longer than one character, at least the first character is printed in that position
valueAbsolute monetary value

Each specifier can only appear once in the pattern.

Notice that the type of the elements in the field array is char and not moneypunct::part. This was done in the design of the library for efficiency purposes, but field is designed to hold four moneypunct::part values.

See also