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,
ctype<char>::_M_widen_init): Don't define here.
* config/locale/gnu/ctype_members.cc: Likewise.
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
/**
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].
// 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
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&);
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&);
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.
// 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
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&);