]> gcc.gnu.org Git - gcc.git/commitdiff
ctype.cc (use_facet<ctype<char> >, [...]): Remove specializations.
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 10 Sep 2008 21:34:38 +0000 (21:34 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 10 Sep 2008 21:34:38 +0000 (21:34 +0000)
2008-09-10  Paolo Carlini  <paolo.carlini@oracle.com>

* src/ctype.cc (use_facet<ctype<char> >, use_facet<ctype<wchar_t>):
Remove specializations.
* src/locale-inst.cc (use_facet<ctype<C> >): Instantiate.
* include/bits/locale_facets.tcc (use_facet<ctype<char> >,
use_facet<ctype<wchar_t>): Declare as extern template.
* include/bits/locale_facets.h (use_facet<ctype<char> >,
use_facet<ctype<wchar_t>): Do not declare as specializations.

From-SVN: r140251

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_facets.h
libstdc++-v3/include/bits/locale_facets.tcc
libstdc++-v3/src/ctype.cc
libstdc++-v3/src/locale-inst.cc

index 03371b4c421f3c2bb6865867190baa9b88077796..8b7cd469cfb7f0cb86166b1e0b891498f66d26c4 100644 (file)
@@ -1,3 +1,13 @@
+2008-09-10  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * src/ctype.cc (use_facet<ctype<char> >, use_facet<ctype<wchar_t>):
+       Remove specializations.
+       * src/locale-inst.cc (use_facet<ctype<C> >): Instantiate.
+       * include/bits/locale_facets.tcc (use_facet<ctype<char> >,
+       use_facet<ctype<wchar_t>): Declare as extern template.
+       * include/bits/locale_facets.h (use_facet<ctype<char> >,
+       use_facet<ctype<wchar_t>): Do not declare as specializations.
+
 2008-09-10  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * config/locale/darwin/ctype_members.cc (ctype<char>::_M_narrow_init,
index 340d21d7e048cb48308ee0f3b8b338cbf7f54985..258166081836ea01e31dfd0d6bf6bd053dbe2a36 100644 (file)
@@ -1165,10 +1165,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       void _M_widen_init() const;
     };
 
-  template<>
-    const ctype<char>&
-    use_facet<ctype<char> >(const locale& __loc);
-
 #ifdef _GLIBCXX_USE_WCHAR_T
   // 22.2.1.3  ctype<wchar_t> specialization
   /**
@@ -1470,10 +1466,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       void
       _M_initialize_ctype();
     };
-
-  template<>
-    const ctype<wchar_t>&
-    use_facet<ctype<wchar_t> >(const locale& __loc);
 #endif //_GLIBCXX_USE_WCHAR_T
 
   /// class ctype_byname [22.2.1.2].
index 744e373f54af3c98cc6cc094e60e6aa512cc5e99..49610258f4b03bbebede2abc3ad3f0b4a4499f58 100644 (file)
@@ -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<char>;
   extern template class ctype_byname<char>;
 
+  extern template
+    const ctype<char>&
+    use_facet<ctype<char> >(const locale&);
+
   extern template
     const numpunct<char>&
     use_facet<numpunct<char> >(const locale&);
@@ -1318,6 +1322,10 @@ _GLIBCXX_END_LDBL_NAMESPACE
   extern template class _GLIBCXX_LDBL_NAMESPACE num_put<wchar_t>;
   extern template class ctype_byname<wchar_t>;
 
+  extern template
+    const ctype<wchar_t>&
+    use_facet<ctype<wchar_t> >(const locale&);
+
   extern template
     const numpunct<wchar_t>&
     use_facet<numpunct<wchar_t> >(const locale&);
index cb9c853906e8c3bb57bd56b0d7e717bf4f92e507..e9791508b0960e9a7ed2d52e138b41315e7f6168 100644 (file)
@@ -53,26 +53,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   locale::id ctype<wchar_t>::id;
 #endif
 
-  template<>
-    const ctype<char>&
-    use_facet<ctype<char> >(const locale& __loc)
-    {
-      size_t __i = ctype<char>::id._M_id();
-      const locale::_Impl* __tmp = __loc._M_impl;
-      return static_cast<const ctype<char>&>(*(__tmp->_M_facets[__i]));
-    }
-
-#ifdef _GLIBCXX_USE_WCHAR_T
-  template<>
-    const ctype<wchar_t>&
-    use_facet<ctype<wchar_t> >(const locale& __loc)
-    {
-      size_t __i = ctype<wchar_t>::id._M_id();
-      const locale::_Impl* __tmp = __loc._M_impl;
-      return static_cast<const ctype<wchar_t>&>(*(__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.
index 790e6146943b82917c9360d4f72549d4606c3715..8d2ac77378c795238d816c2d0b64901cfb967a66 100644 (file)
@@ -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<C>;
     
   // use_facet
-  // NB: use_facet<ctype> is specialized
+  template
+    const ctype<C>& 
+    use_facet<ctype<C> >(const locale&);
+
   template
     const codecvt<C, char, mbstate_t>& 
     use_facet<codecvt<C, char, mbstate_t> >(const locale&);
This page took 0.086922 seconds and 5 git commands to generate.