This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] 27_io/ios_manip_basefield.cc
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Tue, 26 Feb 2002 09:39:26 -0800 (PST)
- Subject: Re: [RFC] 27_io/ios_manip_basefield.cc
> 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