This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.
Section: 126.96.36.199.2 [locale.money.get.virtuals] Status: NAD Submitter: Thomas Plum Opened: 2007-04-16 Last modified: 2016-12-23
Priority: Not Prioritized
View all other issues in [locale.money.get.virtuals].
View all issues with NAD status.
188.8.131.52.2 [locale.money.get.virtuals], para 1 says:
The result is returned as an integral value stored in units or as a sequence of digits possibly preceded by a minus sign (as produced by ct.widen(c) where c is '-' or in the range from '0' through '9', inclusive) stored in digits.
The following objection has been raised:
Some implementations interpret this to mean that a facet derived from ctype<wchar_t> can provide its own member do_widen(char) which produces e.g. L'@' for the "widened" minus sign, and that the '@' symbol will appear in the resulting sequence of digits. Other implementations have assumed that one or more places in the standard permit the implementation to "hard-wire" L'-' as the "widened" minus sign. Are both interpretations permissible, or only one?
[Plum ref _222612Y14]
Furthermore: if ct.widen('9') produces L'X' (a non-digit), does a parse fail if a '9' appears in the subject string? [Plum ref _22263Y33]
[ Kona (2007): Bill and Dietmar to provide proposed wording. ]
[ post Bellevue: Bill adds: ]
The Standard is clear that the minus sign stored in digits is ct.widen('-'). The subject string must contain characters c in the set [-0123456789] which are translated by ct.widen(c) calls before being stored in digits; the widened characters are not relevant to the parsing of the subject string.
[ Batavia (2009-05): ]
We agree with Bill's comment above, in line with the first of the interpretations offered in the issue. Move to NAD.