thousands_sep
after a decimal_point
Section: 28.3.4.3.2.3 [facet.num.get.virtuals] Status: CD1 Submitter: Martin Sebor Opened: 2002-03-12 Last modified: 2016-01-28
Priority: Not Prioritized
View other active issues in [facet.num.get.virtuals].
View all other issues in [facet.num.get.virtuals].
View all issues with CD1 status.
Discussion:
I don't think thousands_sep
is being treated correctly after
decimal_point has been seen. Since grouping applies only to the
integral part of the number, the first such occurrence should, IMO,
terminate Stage 2. (If it does not terminate it, then 22.2.2.1.2, p12
and 22.2.3.1.2, p3 need to explain how thousands_sep
is to be
interpreted in the fractional part of a number.)
The easiest change I can think of that resolves this issue would be something like below.
Proposed resolution:
Change the first sentence of 22.2.2.1.2, p9 from
If discard is true then the position of the character is remembered, but the character is otherwise ignored. If it is not discarded, then a check is made to determine if c is allowed as the next character of an input field of the conversion specifier returned by stage 1. If so it is accumulated.
to
If
discard
is true, then if'.'
has not yet been accumulated, then the position of the character is remembered, but the character is otherwise ignored. Otherwise, if'.'
has already been accumulated, the character is discarded and Stage 2 terminates. ...
Rationale:
We believe this reflects the intent of the Standard. Thousands sep characters after the decimal point are not useful in any locale. Some formatting conventions do group digits that follow the decimal point, but they usually introduce a different grouping character instead of reusing the thousand sep character. If we want to add support for such conventions, we need to do so explicitly.