3.1 libstdc++ calls setlocale to format a number
Teemu Torma
tot@trema.com
Fri Mar 15 06:01:00 GMT 2002
I just noticed that in libstdc++ __convert_from_v template calls setlocale to
format a number with sprintf.
For me that does not sound a good idea, firstly because it is not MT safe
(two threads using streams will corrupt your locale setting, or at least
another thread is operating in the wrong "C" locale for a while), and
setlocale is not necessarily very fast operation.
Teemu
More information about the Gcc
mailing list