Created on 2007-04-16.00:00:00 last changed 171 months ago
[ 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.
[ 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.
[ Kona (2007): Bill and Dietmar to provide proposed wording. ]
[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]
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg3376 |
2010-10-21 18:28:33 | admin | set | messages: + msg3375 |
2010-10-21 18:28:33 | admin | set | messages: + msg3374 |
2007-04-16 00:00:00 | admin | create |