diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-07 01:56:26 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-07 01:56:26 +0000 |
commit | 7f71c5fa5f67a55ec690c3d73f9581a05496a45e (patch) | |
tree | 15c5a5d2246bc94d83fe85dd9a5378bc5950ec39 /libstdc++-v3/src | |
parent | aad359a1a68a41aa4d2daa560e782ea5fa3351b2 (diff) | |
download | gcc-7f71c5fa5f67a55ec690c3d73f9581a05496a45e.tar.gz |
2009-01-06 Benjamin Kosnik <bkoz@redhat.com>
* src/locale_init.cc (locale::_S_initialize_once): Move construction
of classic locale...
(locale::classic): Here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143149 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/locale_init.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libstdc++-v3/src/locale_init.cc b/libstdc++-v3/src/locale_init.cc index 28ee484112f..0730155b236 100644 --- a/libstdc++-v3/src/locale_init.cc +++ b/libstdc++-v3/src/locale_init.cc @@ -1,4 +1,5 @@ -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +// 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -242,9 +243,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const locale& locale::classic() - { + { _S_initialize(); - return reinterpret_cast<const locale&>(c_locale); + return *(new (&c_locale) locale(_S_classic)); } void @@ -254,7 +255,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // One reference for _S_classic, one for _S_global _S_classic = new (&c_locale_impl) _Impl(2); _S_global = _S_classic; - new (&c_locale) locale(_S_classic); } void |