backport: basic_string.h: Qualify symbols with 'template'.

2001-07-19  Phil Edwards  <pme@sources.redhat.com>
            Mark Mitchell <mark@codesourcery.com>

	Merge from cp-parser-branch.
	* include/bits/basic_string.h:  Qualify symbols with 'template'.
	* include/bits/basic_string.tcc:  Likewise.
	* include/bits/fstream.tcc:  Likewise.
	* include/bits/istream.tcc:  Likewise.
	* include/bits/sstream.tcc:  Likewise.
	* include/bits/std_istream.h:  Likewise.
	* include/bits/stl_iterator.h:  Likewise.
	* include/bits/streambuf.tcc:  Likewise.
	* src/gen-num-limits.cc:  Add 'template<>' to specializations.
	* src/locale.cc:  Likewise.

Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r44167
This commit is contained in:
Phil Edwards 2001-07-20 00:09:31 +00:00
parent 6dd12198d0
commit 31bfa17776
11 changed files with 97 additions and 45 deletions

View file

@ -1,3 +1,18 @@
2001-07-19 Phil Edwards <pme@sources.redhat.com>
Mark Mitchell <mark@codesourcery.com>
Merge from cp-parser-branch.
* include/bits/basic_string.h: Qualify symbols with 'template'.
* include/bits/basic_string.tcc: Likewise.
* include/bits/fstream.tcc: Likewise.
* include/bits/istream.tcc: Likewise.
* include/bits/sstream.tcc: Likewise.
* include/bits/std_istream.h: Likewise.
* include/bits/stl_iterator.h: Likewise.
* include/bits/streambuf.tcc: Likewise.
* src/gen-num-limits.cc: Add 'template<>' to specializations.
* src/locale.cc: Likewise.
2001-07-19 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 2001-07-19 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
Bert De Knuydt <Bert.Deknuydt@esat.kuleuven.ac.be> Bert De Knuydt <Bert.Deknuydt@esat.kuleuven.ac.be>

View file

@ -118,7 +118,7 @@ namespace std
struct _Rep struct _Rep
{ {
// Types: // Types:
typedef typename _Alloc::rebind<char>::other _Raw_bytes_alloc; typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc;
// (Public) Data members: // (Public) Data members:

View file

@ -354,7 +354,7 @@ namespace std
#endif #endif
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::_Rep* typename basic_string<_CharT, _Traits, _Alloc>::_Rep*
basic_string<_CharT, _Traits, _Alloc>::_Rep:: basic_string<_CharT, _Traits, _Alloc>::_Rep::
_S_create(size_t __capacity, const _Alloc& __alloc) _S_create(size_t __capacity, const _Alloc& __alloc)
{ {
@ -571,7 +571,7 @@ namespace std
} }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
copy(_CharT* __s, size_type __n, size_type __pos) const copy(_CharT* __s, size_type __n, size_type __pos) const
{ {
@ -587,7 +587,7 @@ namespace std
} }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
find(const _CharT* __s, size_type __pos, size_type __n) const find(const _CharT* __s, size_type __pos, size_type __n) const
{ {
@ -601,7 +601,7 @@ namespace std
} }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
find(_CharT __c, size_type __pos) const find(_CharT __c, size_type __pos) const
{ {
@ -620,7 +620,7 @@ namespace std
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
rfind(const _CharT* __s, size_type __pos, size_type __n) const rfind(const _CharT* __s, size_type __pos, size_type __n) const
{ {
@ -640,7 +640,7 @@ namespace std
} }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
rfind(_CharT __c, size_type __pos) const rfind(_CharT __c, size_type __pos) const
{ {
@ -659,7 +659,7 @@ namespace std
} }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
find_first_of(const _CharT* __s, size_type __pos, size_type __n) const find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
{ {
@ -673,7 +673,7 @@ namespace std
} }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
find_last_of(const _CharT* __s, size_type __pos, size_type __n) const find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
{ {
@ -693,7 +693,7 @@ namespace std
} }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
{ {
@ -705,7 +705,7 @@ namespace std
} }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
find_first_not_of(_CharT __c, size_type __pos) const find_first_not_of(_CharT __c, size_type __pos) const
{ {
@ -717,7 +717,7 @@ namespace std
} }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
{ {
@ -737,7 +737,7 @@ namespace std
} }
template<typename _CharT, typename _Traits, typename _Alloc> template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::size_type typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>:: basic_string<_CharT, _Traits, _Alloc>::
find_last_not_of(_CharT __c, size_type __pos) const find_last_not_of(_CharT __c, size_type __pos) const
{ {

View file

@ -139,7 +139,7 @@ namespace std
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_filebuf<_CharT, _Traits>::__filebuf_type* typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
basic_filebuf<_CharT, _Traits>:: basic_filebuf<_CharT, _Traits>::
open(const char* __s, ios_base::openmode __mode) open(const char* __s, ios_base::openmode __mode)
{ {
@ -166,7 +166,7 @@ namespace std
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_filebuf<_CharT, _Traits>::__filebuf_type* typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
basic_filebuf<_CharT, _Traits>:: basic_filebuf<_CharT, _Traits>::
close() close()
{ {
@ -232,7 +232,7 @@ namespace std
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_filebuf<_CharT, _Traits>::int_type typename basic_filebuf<_CharT, _Traits>::int_type
basic_filebuf<_CharT, _Traits>:: basic_filebuf<_CharT, _Traits>::
underflow() underflow()
{ {
@ -303,7 +303,7 @@ namespace std
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_filebuf<_CharT, _Traits>::int_type typename basic_filebuf<_CharT, _Traits>::int_type
basic_filebuf<_CharT, _Traits>:: basic_filebuf<_CharT, _Traits>::
pbackfail(int_type __i) pbackfail(int_type __i)
{ {
@ -371,7 +371,7 @@ namespace std
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_filebuf<_CharT, _Traits>::int_type typename basic_filebuf<_CharT, _Traits>::int_type
basic_filebuf<_CharT, _Traits>:: basic_filebuf<_CharT, _Traits>::
overflow(int_type __c) overflow(int_type __c)
{ {
@ -396,7 +396,7 @@ namespace std
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_filebuf<_CharT, _Traits>::int_type typename basic_filebuf<_CharT, _Traits>::int_type
basic_filebuf<_CharT, _Traits>:: basic_filebuf<_CharT, _Traits>::
_M_really_overflow(int_type __c) _M_really_overflow(int_type __c)
{ {
@ -475,7 +475,7 @@ namespace std
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_filebuf<_CharT, _Traits>::__streambuf_type* typename basic_filebuf<_CharT, _Traits>::__streambuf_type*
basic_filebuf<_CharT, _Traits>:: basic_filebuf<_CharT, _Traits>::
setbuf(char_type* __s, streamsize __n) setbuf(char_type* __s, streamsize __n)
{ {
@ -503,7 +503,7 @@ namespace std
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_filebuf<_CharT, _Traits>::pos_type typename basic_filebuf<_CharT, _Traits>::pos_type
basic_filebuf<_CharT, _Traits>:: basic_filebuf<_CharT, _Traits>::
seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
{ {
@ -559,7 +559,7 @@ namespace std
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_filebuf<_CharT, _Traits>::pos_type typename basic_filebuf<_CharT, _Traits>::pos_type
basic_filebuf<_CharT, _Traits>:: basic_filebuf<_CharT, _Traits>::
seekpos(pos_type __pos, ios_base::openmode __mode) seekpos(pos_type __pos, ios_base::openmode __mode)
{ {

View file

@ -465,7 +465,7 @@ namespace std
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>::int_type typename basic_istream<_CharT, _Traits>::int_type
basic_istream<_CharT, _Traits>:: basic_istream<_CharT, _Traits>::
get(void) get(void)
{ {
@ -720,7 +720,7 @@ namespace std
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>::int_type typename basic_istream<_CharT, _Traits>::int_type
basic_istream<_CharT, _Traits>:: basic_istream<_CharT, _Traits>::
peek(void) peek(void)
{ {

View file

@ -40,7 +40,7 @@ namespace std
{ {
template <class _CharT, class _Traits, class _Alloc> template <class _CharT, class _Traits, class _Alloc>
basic_stringbuf<_CharT, _Traits, _Alloc>::int_type typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
basic_stringbuf<_CharT, _Traits, _Alloc>:: basic_stringbuf<_CharT, _Traits, _Alloc>::
pbackfail(int_type __c) pbackfail(int_type __c)
{ {
@ -74,7 +74,7 @@ namespace std
} }
template <class _CharT, class _Traits, class _Alloc> template <class _CharT, class _Traits, class _Alloc>
basic_stringbuf<_CharT, _Traits, _Alloc>::int_type typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
basic_stringbuf<_CharT, _Traits, _Alloc>:: basic_stringbuf<_CharT, _Traits, _Alloc>::
overflow(int_type __c) overflow(int_type __c)
{ {
@ -114,7 +114,7 @@ namespace std
} }
template <class _CharT, class _Traits, class _Alloc> template <class _CharT, class _Traits, class _Alloc>
basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
basic_stringbuf<_CharT, _Traits, _Alloc>:: basic_stringbuf<_CharT, _Traits, _Alloc>::
seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
{ {
@ -172,7 +172,7 @@ namespace std
} }
template <class _CharT, class _Traits, class _Alloc> template <class _CharT, class _Traits, class _Alloc>
basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
basic_stringbuf<_CharT, _Traits, _Alloc>:: basic_stringbuf<_CharT, _Traits, _Alloc>::
seekpos(pos_type __sp, ios_base::openmode __mode) seekpos(pos_type __sp, ios_base::openmode __mode)
{ {

View file

@ -217,7 +217,7 @@ namespace std
typedef _Traits traits_type; typedef _Traits traits_type;
typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_istream<_CharT, _Traits> __istream_type;
typedef __istream_type::__ctype_type __ctype_type; typedef typename __istream_type::__ctype_type __ctype_type;
typedef typename _Traits::int_type __int_type; typedef typename _Traits::int_type __int_type;
explicit explicit

View file

@ -442,7 +442,7 @@ namespace std
template<typename _Iterator, typename _Container> template<typename _Iterator, typename _Container>
inline __normal_iterator<_Iterator, _Container> inline __normal_iterator<_Iterator, _Container>
operator+(__normal_iterator<_Iterator, _Container>::difference_type __n, operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n,
const __normal_iterator<_Iterator, _Container>& __i) const __normal_iterator<_Iterator, _Container>& __i)
{ return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
} // namespace std } // namespace std

View file

@ -37,7 +37,7 @@
namespace std { namespace std {
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_streambuf<_CharT, _Traits>::int_type typename basic_streambuf<_CharT, _Traits>::int_type
basic_streambuf<_CharT, _Traits>:: basic_streambuf<_CharT, _Traits>::
sbumpc() sbumpc()
{ {
@ -54,7 +54,7 @@ namespace std {
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_streambuf<_CharT, _Traits>::int_type typename basic_streambuf<_CharT, _Traits>::int_type
basic_streambuf<_CharT, _Traits>:: basic_streambuf<_CharT, _Traits>::
sputbackc(char_type __c) sputbackc(char_type __c)
{ {
@ -72,7 +72,7 @@ namespace std {
} }
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_streambuf<_CharT, _Traits>::int_type typename basic_streambuf<_CharT, _Traits>::int_type
basic_streambuf<_CharT, _Traits>:: basic_streambuf<_CharT, _Traits>::
sungetc() sungetc()
{ {
@ -93,7 +93,7 @@ namespace std {
// buffers will still be valid. (This happens if setp is used to set // buffers will still be valid. (This happens if setp is used to set
// the internal buffer to say some externally-allocated sequence.) // the internal buffer to say some externally-allocated sequence.)
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
basic_streambuf<_CharT, _Traits>::int_type typename basic_streambuf<_CharT, _Traits>::int_type
basic_streambuf<_CharT, _Traits>:: basic_streambuf<_CharT, _Traits>::
sputc(char_type __c) sputc(char_type __c)
{ {

View file

@ -206,7 +206,9 @@ template<typename T>
}; };
#define DEFINED_TYPE_NAME(T) \ #define DEFINED_TYPE_NAME(T) \
template<> \
const char type_name_trait< T >::type_name[] = #T; \ const char type_name_trait< T >::type_name[] = #T; \
template<> \
const char type_name_trait< T >::trait_name[] = "numeric_limits<" #T ">"; const char type_name_trait< T >::trait_name[] = "numeric_limits<" #T ">";
DEFINED_TYPE_NAME(bool); DEFINED_TYPE_NAME(bool);
@ -279,7 +281,9 @@ template<typename T>
const bool predicate<T>::is_exact = true; const bool predicate<T>::is_exact = true;
#define SPECIALIZE_EXACTNESS(T) \ #define SPECIALIZE_EXACTNESS(T) \
template<> \
const bool predicate< T >::is_integer = false; \ const bool predicate< T >::is_integer = false; \
template<> \
const bool predicate< T >::is_exact = false const bool predicate< T >::is_exact = false
SPECIALIZE_EXACTNESS(float); SPECIALIZE_EXACTNESS(float);
@ -311,6 +315,7 @@ template<typename T>
const bool predicate<T>::is_iec559 = false; const bool predicate<T>::is_iec559 = false;
#define SPECIALIZE_IEC559(T) \ #define SPECIALIZE_IEC559(T) \
template<> \
const bool predicate< T >::is_iec559 = true const bool predicate< T >::is_iec559 = true
SPECIALIZE_IEC559(bool); SPECIALIZE_IEC559(bool);
@ -349,7 +354,9 @@ template<typename T>
#define DEFINE_EXTREMA(T, m, M) DO_DEFINE_EXTREMA(T, m, M) #define DEFINE_EXTREMA(T, m, M) DO_DEFINE_EXTREMA(T, m, M)
#define DO_DEFINE_EXTREMA(T, m, M) \ #define DO_DEFINE_EXTREMA(T, m, M) \
template<> \
const char value< T >::min[] = #m; \ const char value< T >::min[] = #m; \
template<> \
const char value< T >::max[] = #M const char value< T >::max[] = #M
DEFINE_EXTREMA(bool, false, true); DEFINE_EXTREMA(bool, false, true);
@ -386,8 +393,10 @@ const int value<T>::digits =
template<typename T> template<typename T>
const int value<T>::radix = 2; const int value<T>::radix = 2;
#define SPECIALIZE_DIGITS(T, D, D10) \ #define SPECIALIZE_DIGITS(T, D, D10) \
const int value< T >::digits = D; \ template<> \
const int value< T >::digits = D; \
template<> \
const int value< T >::digits10 = D10 const int value< T >::digits10 = D10
SPECIALIZE_DIGITS(float, FLT_MANT_DIG, FLT_DIG); SPECIALIZE_DIGITS(float, FLT_MANT_DIG, FLT_DIG);
@ -397,7 +406,9 @@ SPECIALIZE_DIGITS(long double, LDBL_MANT_DIG, LDBL_DIG);
#undef SPECIALIZE_DIGITS #undef SPECIALIZE_DIGITS
#define SPECIALIZE_RADIX(T, R) const int value< T >::radix = R #define SPECIALIZE_RADIX(T, R) \
template<> \
const int value< T >::radix = R
SPECIALIZE_RADIX(float, FLT_RADIX); SPECIALIZE_RADIX(float, FLT_RADIX);
SPECIALIZE_RADIX(double, FLT_RADIX); SPECIALIZE_RADIX(double, FLT_RADIX);
@ -418,7 +429,9 @@ const char value<T>::epsilon[] = "0";
#endif #endif
#define SPECIALIZE_EPSILON(T, E) DO_SPECIALIZE_EPSILON(T, E) #define SPECIALIZE_EPSILON(T, E) DO_SPECIALIZE_EPSILON(T, E)
#define DO_SPECIALIZE_EPSILON(T, E) const char value< T >::epsilon[] = #E #define DO_SPECIALIZE_EPSILON(T, E) \
template<> \
const char value< T >::epsilon[] = #E
// unsophisticated, gross method // unsophisticated, gross method
#if 1 #if 1
@ -457,7 +470,9 @@ template<typename T>
const char value<T>::round_error[] = "0"; const char value<T>::round_error[] = "0";
#endif #endif
#define SPECIALIZE_ROUND_ERROR(T, R) const char value< T >::round_error[] = #R #define SPECIALIZE_ROUND_ERROR(T, R) \
template<> \
const char value< T >::round_error[] = #R
// unsophisticated, gross method // unsophisticated, gross method
#if 1 #if 1
SPECIALIZE_ROUND_ERROR(bool, 0); SPECIALIZE_ROUND_ERROR(bool, 0);
@ -494,10 +509,14 @@ const int value<T>::max_exponent = 0;
template<typename T> template<typename T>
const int value<T>::max_exponent10 = 0; const int value<T>::max_exponent10 = 0;
#define SPECIALIZE_EXPONENTS(T, m, m10, M, M10) \ #define SPECIALIZE_EXPONENTS(T, m, m10, M, M10) \
const int value< T >::min_exponent = m; \ template<> \
const int value< T >::min_exponent10 = m10; \ const int value< T >::min_exponent = m; \
const int value< T >::max_exponent = M; \ template<> \
const int value< T >::min_exponent10 = m10; \
template<> \
const int value< T >::max_exponent = M; \
template<> \
const int value< T >::max_exponent10 = M10 const int value< T >::max_exponent10 = M10
SPECIALIZE_EXPONENTS(float, FLT_MIN_EXP, FLT_MIN_10_EXP, SPECIALIZE_EXPONENTS(float, FLT_MIN_EXP, FLT_MIN_10_EXP,

View file

@ -603,6 +603,7 @@ namespace std
return __hi; return __hi;
} }
template<>
ctype_byname<char>::ctype_byname(const char* /*__s*/, size_t __refs) ctype_byname<char>::ctype_byname(const char* /*__s*/, size_t __refs)
: ctype<char>(new mask[table_size], true, __refs) : ctype<char>(new mask[table_size], true, __refs)
{ } { }
@ -1002,11 +1003,14 @@ namespace std
return __incl_prec; return __incl_prec;
} }
template <>
collate<char>::collate(size_t __refs) collate<char>::collate(size_t __refs)
: locale::facet(__refs) { } : locale::facet(__refs) { }
template<>
collate<char>::~collate() { } collate<char>::~collate() { }
template<>
int int
collate<char>::do_compare(const char* __lo1, const char* __hi1, collate<char>::do_compare(const char* __lo1, const char* __hi1,
const char* __lo2, const char* __hi2) const const char* __lo2, const char* __hi2) const
@ -1022,11 +1026,13 @@ namespace std
return 0; return 0;
} }
template<>
string string
collate<char>:: collate<char>::
do_transform(const char* __lo, const char* __hi) const do_transform(const char* __lo, const char* __hi) const
{ return string(__lo, __hi - __lo); } { return string(__lo, __hi - __lo); }
template<>
long long
collate<char>:: collate<char>::
do_hash(const char* __lo, const char* __hi) const do_hash(const char* __lo, const char* __hi) const
@ -1037,18 +1043,22 @@ namespace std
(__val >> (numeric_limits<unsigned long>::digits - 1))); (__val >> (numeric_limits<unsigned long>::digits - 1)));
return __val; return __val;
} }
template<>
collate_byname<char>::collate_byname(const char* /*__s*/, size_t __refs) collate_byname<char>::collate_byname(const char* /*__s*/, size_t __refs)
: collate<char>(__refs) { } : collate<char>(__refs) { }
template<>
moneypunct_byname<char, false>::moneypunct_byname(const char* /*__s*/, moneypunct_byname<char, false>::moneypunct_byname(const char* /*__s*/,
size_t __refs) size_t __refs)
: moneypunct<char, false>(__refs) { } : moneypunct<char, false>(__refs) { }
template<>
moneypunct_byname<char, true>::moneypunct_byname(const char* /*__s*/, moneypunct_byname<char, true>::moneypunct_byname(const char* /*__s*/,
size_t __refs) size_t __refs)
: moneypunct<char, true>(__refs) { } : moneypunct<char, true>(__refs) { }
template<>
messages_byname<char>:: messages_byname<char>::
messages_byname(const char* /*__s*/, size_t __refs) messages_byname(const char* /*__s*/, size_t __refs)
: messages<char>(__refs) { } : messages<char>(__refs) { }
@ -1205,16 +1215,20 @@ namespace std
return __hi; return __hi;
} }
template<>
ctype_byname<wchar_t>:: ctype_byname<wchar_t>::
ctype_byname(const char* /*__s*/, size_t __refs) ctype_byname(const char* /*__s*/, size_t __refs)
: ctype<wchar_t>(__refs) { } : ctype<wchar_t>(__refs) { }
template<>
collate<wchar_t>:: collate<wchar_t>::
collate(size_t __refs): locale::facet(__refs) { } collate(size_t __refs): locale::facet(__refs) { }
template<>
collate<wchar_t>:: collate<wchar_t>::
~collate() { } ~collate() { }
template<>
int int
collate<wchar_t>:: collate<wchar_t>::
do_compare(const wchar_t* /*__lo1*/, const wchar_t* /*__hi1*/, do_compare(const wchar_t* /*__lo1*/, const wchar_t* /*__hi1*/,
@ -1222,23 +1236,27 @@ namespace std
{ {
return 0; // XXX not done return 0; // XXX not done
} }
template<>
wstring collate<wchar_t>:: wstring collate<wchar_t>::
do_transform(const wchar_t* /*__lo*/, const wchar_t* /*__hi*/) const do_transform(const wchar_t* /*__lo*/, const wchar_t* /*__hi*/) const
{ {
return wstring(); // XXX not done return wstring(); // XXX not done
} }
template<>
long collate<wchar_t>:: long collate<wchar_t>::
do_hash(const wchar_t* /*__lo*/, const wchar_t* /*__hi*/) const do_hash(const wchar_t* /*__lo*/, const wchar_t* /*__hi*/) const
{ {
return 0; // XXX not done return 0; // XXX not done
} }
template<>
collate_byname<wchar_t>:: collate_byname<wchar_t>::
collate_byname(const char* /*__s*/, size_t __refs) collate_byname(const char* /*__s*/, size_t __refs)
: collate<wchar_t> (__refs) { } : collate<wchar_t> (__refs) { }
template<>
messages_byname<wchar_t>:: messages_byname<wchar_t>::
messages_byname(const char* /*__s*/, size_t __refs) messages_byname(const char* /*__s*/, size_t __refs)
: messages<wchar_t> (__refs) { } : messages<wchar_t> (__refs) { }