From: Paolo Carlini Date: Wed, 10 Sep 2008 21:34:38 +0000 (+0000) Subject: ctype.cc (use_facet >, [...]): Remove specializations. X-Git-Tag: releases/gcc-4.4.0~2502 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=08376e28d4db9f3c3fdf33de39c77ea881e47c73;p=thirdparty%2Fgcc.git ctype.cc (use_facet >, [...]): Remove specializations. 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. From-SVN: r140251 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 03371b4c421f..8b7cd469cfb7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,13 @@ +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, diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index 340d21d7e048..258166081836 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 744e373f54af..49610258f4b0 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 @@ -1283,6 +1283,10 @@ _GLIBCXX_END_LDBL_NAMESPACE extern template class _GLIBCXX_LDBL_NAMESPACE num_put; extern template class ctype_byname; + extern template + const ctype& + use_facet >(const locale&); + extern template const numpunct& use_facet >(const locale&); @@ -1318,6 +1322,10 @@ _GLIBCXX_END_LDBL_NAMESPACE extern template class _GLIBCXX_LDBL_NAMESPACE num_put; 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 cb9c853906e8..e9791508b096 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 790e6146943b..8d2ac77378c7 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&);