Title
Bad sprintf format modifier in money_put<>::do_put()
Status
cd1
Section
[locale.money.put.virtuals]
Submitter
Martin Sebor

Created on 2001-07-07.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

Fixes an obvious typo

Date: 2010-10-21.18:28:33

Proposed resolution:

Change the format string to "%.0Lf".

Date: 2001-07-07.00:00:00

The sprintf format string , "%.01f" (that's the digit one), in the description of the do_put() member functions of the money_put facet in 22.2.6.2.2, p1 is incorrect. First, the f format specifier is wrong for values of type long double, and second, the precision of 01 doesn't seem to make sense. What was most likely intended was "%.0Lf"., that is a precision of zero followed by the L length modifier.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg2249
2010-10-21 18:28:33adminsetmessages: + msg2248
2001-07-07 00:00:00admincreate