[RFC] 27_io/ios_manip_basefield.cc
Benjamin Kosnik
bkoz@redhat.com
Tue Feb 26 10:09:00 GMT 2002
> I completely agree with you. In the next couple of days I will work on
> _M_widen_int (and the corresponding projected output) to enable grouping
> for hexs and octs. The only tricky point is that we cannot simply change
> the condition if (__grouping.size() && __dec) to (__grouping.size()))
> since, as is, __add_grouping is not able to deal correctly with numbers
> beginning with 0x or 0X or 0 (when showbase is true, I mean). But I can
> work out this.
Great. I'd suggest looking at the message identified earlier, from the
library reflector. The grouping status of numbers with 0x, 0X, 0 seems to
be unclear. (Ie, it's unknown how to treat them.) There's supposed to be
a DR about this too, but it was never written.
0x123,456
or
0x,123,456
0123,456
or
0,123,456
I'm up for the second interpretation, which should be easier to
implement and doesn't special case any digits. In general, I think grouping
for hex numbers makes little sense. Can anybody think of a reason to do so?
-benjamin
More information about the Libstdc++
mailing list