Title
num_get<>::do_get (..., void*&) checks grouping
Status
nad
Section
[facet.num.put.virtuals]
Submitter
Martin Sebor

Created on 2002-03-12.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

This would be a change: as it stands, the standard clearly specifies that grouping applies to void*. A survey of existing practice shows that most existing implementations do that, as they should.

Date: 2010-10-21.18:28:33

Proposed resolution:

Change the first sentence of 22.2.2.2.2, p12 from

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 then ios_base::failbit is assigned to err.

to

Except for conversions to void*, digit grouping is checked...

Date: 2002-03-12.00:00:00

22.2.2.2.2, p12 specifies that thousands_sep is to be inserted only for integral types (issue 282 suggests that this should be done for all arithmetic types).

22.2.2.1.2, p12 requires that grouping be checked for all extractors including that for void*.

I don't think that's right. void* values should not be checked for grouping, should they? (Although if they should, then num_put needs to write them out, otherwise their extraction will fail.)

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg2356
2010-10-21 18:28:33adminsetmessages: + msg2355
2002-03-12 00:00:00admincreate