Title
money_get's widened minus sign
Status
nad
Section
[locale.money.get.virtuals]
Submitter
Thomas Plum

Created on 2007-04-16.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

[ 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.

Date: 2010-10-21.18:28:33

[ 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.

Date: 2010-10-21.18:28:33

[ Kona (2007): Bill and Dietmar to provide proposed wording. ]

Date: 2007-04-16.00:00:00

[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:33adminsetmessages: + msg3376
2010-10-21 18:28:33adminsetmessages: + msg3375
2010-10-21 18:28:33adminsetmessages: + msg3374
2007-04-16 00:00:00admincreate