From e6d905572af5063121f082def38ed4a1ff58488e Mon Sep 17 00:00:00 2001 From: paolo Date: Wed, 10 Sep 2008 21:34:38 +0000 Subject: [PATCH] 2008-09-10 Paolo Carlini * src/ctype.cc (use_facet >, use_facet): Remove specializations. * src/locale-inst.cc (use_facet >): Instantiate. * include/bits/locale_facets.tcc (use_facet >, use_facet): Declare as extern template. * include/bits/locale_facets.h (use_facet >, use_facet): Do not declare as specializations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140251 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 10 ++++++++++ libstdc++-v3/include/bits/locale_facets.h | 8 -------- libstdc++-v3/include/bits/locale_facets.tcc | 10 +++++++++- libstdc++-v3/src/ctype.cc | 20 -------------------- libstdc++-v3/src/locale-inst.cc | 7 +++++-- 5 files changed, 24 insertions(+), 31 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 03371b4..8b7cd46 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,15 @@ 2008-09-10 Paolo Carlini + * src/ctype.cc (use_facet >, use_facet): + Remove specializations. + * src/locale-inst.cc (use_facet >): Instantiate. + * include/bits/locale_facets.tcc (use_facet >, + use_facet): Declare as extern template. + * include/bits/locale_facets.h (use_facet >, + use_facet): Do not declare as specializations. + +2008-09-10 Paolo Carlini + * config/locale/darwin/ctype_members.cc (ctype::_M_narrow_init, ctype::_M_widen_init): Don't define here. * config/locale/gnu/ctype_members.cc: Likewise. diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index 340d21d..2581660 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -1165,10 +1165,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) void _M_widen_init() const; }; - template<> - const ctype& - use_facet >(const locale& __loc); - #ifdef _GLIBCXX_USE_WCHAR_T // 22.2.1.3 ctype specialization /** @@ -1470,10 +1466,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) void _M_initialize_ctype(); }; - - template<> - const ctype& - use_facet >(const locale& __loc); #endif //_GLIBCXX_USE_WCHAR_T /// class ctype_byname [22.2.1.2]. diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index 744e373..4961025 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -1,7 +1,7 @@ // Locale support -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007 +// 2006, 2007, 2008 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -1284,6 +1284,10 @@ _GLIBCXX_END_LDBL_NAMESPACE extern template class ctype_byname; extern template + const ctype& + use_facet >(const locale&); + + extern template const numpunct& use_facet >(const locale&); @@ -1319,6 +1323,10 @@ _GLIBCXX_END_LDBL_NAMESPACE extern template class ctype_byname; extern template + const ctype& + use_facet >(const locale&); + + extern template const numpunct& use_facet >(const locale&); diff --git a/libstdc++-v3/src/ctype.cc b/libstdc++-v3/src/ctype.cc index cb9c853..e979150 100644 --- a/libstdc++-v3/src/ctype.cc +++ b/libstdc++-v3/src/ctype.cc @@ -53,26 +53,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) locale::id ctype::id; #endif - template<> - const ctype& - use_facet >(const locale& __loc) - { - size_t __i = ctype::id._M_id(); - const locale::_Impl* __tmp = __loc._M_impl; - return static_cast&>(*(__tmp->_M_facets[__i])); - } - -#ifdef _GLIBCXX_USE_WCHAR_T - template<> - const ctype& - use_facet >(const locale& __loc) - { - size_t __i = ctype::id._M_id(); - const locale::_Impl* __tmp = __loc._M_impl; - return static_cast&>(*(__tmp->_M_facets[__i])); - } -#endif - // XXX At some point, just rename this file to ctype_configure_char.cc // and compile it as a separate file instead of including it here. // Platform-specific initialization code for ctype tables. diff --git a/libstdc++-v3/src/locale-inst.cc b/libstdc++-v3/src/locale-inst.cc index 790e614..8d2ac77 100644 --- a/libstdc++-v3/src/locale-inst.cc +++ b/libstdc++-v3/src/locale-inst.cc @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -192,7 +192,10 @@ _GLIBCXX_END_LDBL_NAMESPACE template class collate_byname; // use_facet - // NB: use_facet is specialized + template + const ctype& + use_facet >(const locale&); + template const codecvt& use_facet >(const locale&); -- 2.7.4