num_get probably not ok for grouped hexs and octs?!?
Paolo Carlini
pcarlini@unitus.it
Wed Feb 27 17:42:00 GMT 2002
Hi all, hi Benjamin,
here in Italy is late and I can really work on the following only tomorrow.
In the meanwhile I thought I had better to inform you all of something a little
alarming I have found in num_get::_M_extract_int, locale_facets.tcc, line 313:
...
bool __check_grouping = __grouping.size() && __base == 10; <=======
int __sep_pos = 0;
const char_type __sep = __np.thousands_sep();
while (__beg != __end)
{
typedef char_traits<_CharT> __traits_type;
const char_type* __p = __traits_type::find(__watoms, __len, __c);
// NB: strchr returns true for __c == 0x0
if (__p && __c)
{
// Try first for acceptable digit; record it if found.
__xtrc += _S_atoms[__p - __watoms];
++__pos;
++__sep_pos;
__c = *(++__beg);
}
else if (__c == __sep && __check_grouping) <========
...
Benjamin, does'nt this mean we have most probably to fix something in the get
code??
Ciao,
Paolo.
More information about the Libstdc++
mailing list