[RFC] Doubts about digit grouping corner cases
Paolo Carlini
pcarlini@unitus.it
Sun Jan 4 00:10:00 GMT 2004
Nathan Myers wrote:
> Besides the description of the phases of numeric parsing, there
> is also the BNF descriptions of number formats found in the
> num_punct section. The idea is, the syntax tells you what
> characters to extract, and then the rest tells how to construct a
> number from the characters extracted, or to fail.
Thanks for pointing this out: in fact I browse the num_punct section
far less frequently, my bad...
Anyway, regarding the specific issue I think are more relevant the
num_get prescriptions: I'm not arguing about failing or not failing
(we do fail in the very same cases before and after my patch), only
about *when* the grouping must be checked: this affects only the final
value of the 'in' iterator: it seems to me that grouping must always
be checked in Stage3. In other terms: a number rejected only because
of wrong thousand separators (not due to other problems) should always
imply a final 'in' iterator pointing to the end of the series of
digits.
Paolo.
More information about the Libstdc++
mailing list