Those are all direct requirements of the C++ standard:
§22.4.6.2.2[locale.money.put.virtuals]/1
The argument units is transformed into a sequence of wide characters as if by
ct.widen(buf1, buf1 + sprintf(buf1, "%.0Lf", units), buf2)
[...] the pattern is the result ofmp.pos_format()
.
here, mp
is the std::moneypunct
facet, so, continuing on to its requirements,
§22.4.6.3[locale.moneypunct]/3
The number of digits required after the decimal point (if any) is exactly the value returned by
frac_digits()
.
and finally, §22.4.6.3.2[locale.moneypunct.virtuals]/6
int do_frac_digits() const;
Returns: The number of digits after the decimal radix separator, if any. [261]261) In common U.S. locales, this is 2.
All this can indeed be summed as "the argument to put_money
is in cents"