This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]