This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
3.1 libstdc++ calls setlocale to format a number
- From: Teemu Torma <tot at trema dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 15 Mar 2002 15:01:47 +0100
- Subject: 3.1 libstdc++ calls setlocale to format a number
- Organization: Trema Group
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