This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.

### 328. Bad sprintf format modifier in money_put<>::do_put()

Section: 28.4.7.3.2 [locale.money.put.virtuals] Status: CD1 Submitter: Martin Sebor Opened: 2001-07-07 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [locale.money.put.virtuals].

View all issues with CD1 status.

Discussion:

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.

Proposed resolution:

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

Rationale:

Fixes an obvious typo