[RFC] First draft of the POSIX locale::name patch

Paolo Carlini pcarlini@unitus.it
Fri Oct 4 06:17:00 GMT 2002


Paolo Carlini wrote:

>>> 2- Is there a clean way to avoid strtok() in
>>>   locale::_Impl::_Impl(const char*, size_t) not changing
>>>   to much the infrastructure?
>>>   
>>
>> I'll look at this next
>
> Thanks.
> Indeed, currently _Impl::_Impl(const char*, size_t) is passed the "C" 
> string in order for it to call the underlying locale, but then all the 
> information about the individual categories must be extracted from it 
> via strtok. This is a pity, since it was available not mangled in 
> locale::locale(const char*).

On second thought, what about simply moving the filling of _M_names 
*inside* locale::locale(const char*)? It looks like it is the *only* 
caller of _Impl::_Impl(const char*, size_t)!

Ciao, Paolo.




More information about the Libstdc++ mailing list