Section: 28.3.4.3.2.3 [facet.num.get.virtuals] Status: New Submitter: Jonathan Wakely Opened: 2019-06-03 Last modified: 2019-08-23
Priority: 4
View other active issues in [facet.num.get.virtuals].
View all other issues in [facet.num.get.virtuals].
View all issues with New status.
Discussion:
28.3.4.3.2.3 [facet.num.get.virtuals] paragraph 4 says:
"Digit grouping is checked. That is, the positions of discarded separators is examined for consistency with
use_facet<numpunct<charT>>(loc).grouping()
. If they are not consistent thenios_base::failbit
is assigned toerr
."
It's unclear what is considered consistent or not.
Obviously if the expected grouping is "1,234,567" then an input of "1,234,567" is consistent. Libstdc++, MSVC and Boost all consider "1234567" to be consistent with an expected grouping "1,234,567" (and it looks like libc++ is going to agree soon). That can be justified by saying that there are no discarded separators to examine, so no inconsistency. But what about "1234,567"? There is only one discarded separator here, and its position is consistent with the expected format. The wording should clarify that if there are no separators at all, that is OK. If there are one or more separators then they must be at the expected positions, and there must not be any missing.[2019-07 Issue Prioritization]
Priority to 4 after discussion on the reflector.
Proposed resolution: