1 // Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
3 // This file is part of the GNU ISO C++ Library. This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 2, or (at your option)
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License along
15 // with this library; see the file COPYING. If not, write to the Free
16 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19 // As a special exception, you may use this file as part of a free software
20 // library without restriction. Specifically, if other files instantiate
21 // templates or use macros or inline functions from this file, or you compile
22 // this file and link it with other files to produce an executable, this
23 // file does not by itself cause the resulting executable to be covered by
24 // the GNU General Public License. This exception does not however
25 // invalidate any other reasons why the executable file might be covered by
26 // the GNU General Public License.
28 #include <bits/std_clocale.h>
29 #include <bits/std_cstring.h>
30 #include <bits/std_cassert.h>
31 #include <bits/std_cctype.h>
32 #include <bits/std_limits.h>
34 #include <bits/std_stdexcept.h>
35 #include <bits/std_locale.h>
36 #include <bits/std_istream.h>
37 #include <bits/std_ostream.h>
38 #include <bits/std_vector.h>
39 #include <bits/std_memory.h> // for auto_ptr
40 #ifdef _GLIBCPP_USE_WCHAR_T
41 # include <bits/std_cwctype.h> // for towupper, etc.
46 // Definitions for static const data members of locale.
47 const locale::category locale::none;
48 const locale::category locale::collate;
49 const locale::category locale::ctype;
50 const locale::category locale::monetary;
51 const locale::category locale::numeric;
52 const locale::category locale::time;
53 const locale::category locale::messages;
54 const locale::category locale::all;
56 locale::_Impl* locale::_S_classic;
57 locale::_Impl* locale::_S_global;
58 const int locale::_S_categories_num;
59 const int locale::_S_facets_num;
61 // Definitions for static const data members of locale::_Impl
62 const locale::id* const
63 locale::_Impl::_S_id_collate[] =
65 &std::collate<char>::id,
66 #ifdef _GLIBCPP_USE_WCHAR_T
67 &std::collate<wchar_t>::id,
72 const locale::id* const
73 locale::_Impl::_S_id_ctype[] =
75 &std::ctype<char>::id,
76 #ifdef _GLIBCPP_USE_WCHAR_T
77 &std::ctype<wchar_t>::id,
79 &codecvt<char, char, mbstate_t>::id,
80 #ifdef _GLIBCPP_USE_WCHAR_T
81 &codecvt<wchar_t, char, mbstate_t>::id,
86 const locale::id* const
87 locale::_Impl::_S_id_monetary[] =
89 &moneypunct<char, false>::id,
90 #ifdef _GLIBCPP_USE_WCHAR_T
91 &moneypunct<wchar_t, false>::id,
93 &std::moneypunct<char,true >::id,
94 #ifdef _GLIBCPP_USE_WCHAR_T
95 &moneypunct<wchar_t,true >::id,
98 #ifdef _GLIBCPP_USE_WCHAR_T
99 &money_get<wchar_t>::id,
101 &money_put<char>::id,
102 #ifdef _GLIBCPP_USE_WCHAR_T
103 &money_put<wchar_t>::id,
108 const locale::id* const
109 locale::_Impl::_S_id_numeric[] =
112 #ifdef _GLIBCPP_USE_WCHAR_T
113 &numpunct<wchar_t>::id,
116 #ifdef _GLIBCPP_USE_WCHAR_T
117 &num_get<wchar_t>::id,
120 #ifdef _GLIBCPP_USE_WCHAR_T
121 &num_put<wchar_t>::id,
126 const locale::id* const
127 locale::_Impl::_S_id_time[] =
130 #ifdef _GLIBCPP_USE_WCHAR_T
131 &time_get<wchar_t>::id,
134 #ifdef _GLIBCPP_USE_WCHAR_T
135 &time_put<wchar_t>::id,
140 const locale::id* const
141 locale::_Impl::_S_id_messages[] =
144 #ifdef _GLIBCPP_USE_WCHAR_T
145 &time_get<wchar_t>::id,
148 #ifdef _GLIBCPP_USE_WCHAR_T
149 &time_put<wchar_t>::id,
154 const locale::id* const* const
155 locale::_Impl::_S_facet_categories[] =
157 // Order must match the decl order in class locale.
158 locale::_Impl::_S_id_collate,
159 locale::_Impl::_S_id_ctype,
160 locale::_Impl::_S_id_monetary,
161 locale::_Impl::_S_id_numeric,
162 locale::_Impl::_S_id_time,
163 locale::_Impl::_S_id_messages,
167 // Definitions for static const data members of locale::id
168 size_t locale::id::_S_highwater; // init'd to 0 by linker
170 // Definitions for static const data members of money_base
171 const money_base::pattern
172 money_base::_S_default_pattern = {{symbol, sign, none, value}};;
175 _Format_cache<char>::_Format_cache()
177 _M_decimal_point('.'), _M_thousands_sep(','),
178 _M_truename("true"), _M_falsename("false"), _M_use_grouping(false)
181 #ifdef _GLIBCPP_USE_WCHAR_T
183 _Format_cache<wchar_t>::_Format_cache()
185 _M_decimal_point(L'.'), _M_thousands_sep(L','),
186 _M_truename(L"true"), _M_falsename(L"false"), _M_use_grouping(false)
192 use_facet<ctype<char> >(const locale& __loc)
194 size_t __i = ctype<char>::id._M_index;
195 const locale::_Impl* __tmp = __loc._M_impl;
196 return static_cast<const ctype<char>&>(* (*(__tmp->_M_facets))[__i]);
199 #ifdef _GLIBCPP_USE_WCHAR_T
201 const ctype<wchar_t>&
202 use_facet<ctype<wchar_t> >(const locale& __loc)
204 size_t __i = ctype<wchar_t>::id._M_index;
205 const locale::_Impl* __tmp = __loc._M_impl;
206 return static_cast<const ctype<wchar_t>&>(* (*(__tmp->_M_facets))[__i]);
212 num_get<char, istreambuf_iterator<char> >::
213 _M_extract(istreambuf_iterator<char> __beg,
214 istreambuf_iterator<char> __end, ios_base& __io,
215 ios_base::iostate& __err, char* __xtrc, int& __base,
218 typedef _Format_cache<char> __cache_type;
220 // Prepare for possible failure
223 // Stage 1: determine a conversion specifier.
224 ios_base::fmtflags __basefield = __io.flags() & ios_base::basefield;
225 if (__basefield == ios_base::dec)
227 else if (__basefield == ios_base::oct)
229 else if (__basefield == ios_base::hex)
233 // As far as I can tell, bases other than 10 are not available for
234 // floating point types
238 // Stage 2: extract characters.
239 __cache_type const* __fmt = __cache_type::_S_get(__io);
240 bool __valid = __beg != __end;
241 // Fail quickly if !__valid
244 __err |= (ios_base::eofbit | ios_base::failbit);
248 // Acceptable formats for numbers here are based on 22.2.3.1
252 const char* __lits = __fmt->_S_literals;
255 // Check first for sign
256 bool __testsign = false;
257 if ((__c == __lits[__cache_type::_S_minus])
258 || (__c == __lits[__cache_type::_S_plus]))
260 __xtrc[__pos++] = __c;
263 // whitespace may follow a sign
264 while ((__beg != __end) && (isspace(*__beg)))
267 // There had better be more to come...
270 __xtrc[__pos] = '\0';
271 __err |= (ios_base::eofbit | ios_base::failbit);
276 bool __testzero = false; // Has there been a leading zero?
278 // Now check if first character is a zero
280 if (__c == __lits[__cache_type::_S_digits])
285 // We have to check for __beg == __end here. If so,
286 // a plain '0' (possibly with a sign) can be got rid of now
289 __xtrc[__pos++] = __c;
290 __xtrc[__pos] = '\0';
291 __err |= ios_base::eofbit;
295 // Figure out base for integer types only
296 // Based on Table 55 of 22.2.2.1.2
297 if (!__fp && __base != 10 && __base != 8)
299 // Here, __base == 0 or 16
301 if ((__c == __lits[__cache_type::_S_x])
302 || (__c == __lits[__cache_type::_S_X]))
306 __testzero = false; // "0x" is not a leading zero
308 else if (__base == 0)
312 // Remove any more leading zeros
313 while (__beg != __end)
315 if (*__beg == __lits[__cache_type::_S_digits])
324 else if (__base == 0) // 1st character is not zero
327 // We now seek "units", i.e. digits and thousands separators.
328 // We may need to know if anything is found here. A leading zero
329 // (removed by now) would count.
330 bool __testunits = __testzero;
331 while (__valid && __beg != __end)
335 const char* __p = strchr(__fmt->_S_literals, __c);
337 // NB: strchr returns true for __c == 0x0
340 // Try first for acceptable digit; record it if found
341 if ((__p >= &__lits[__cache_type::_S_digits]
342 && __p < &__lits[__cache_type::_S_digits + __base])
343 || (__p >= &__lits[__cache_type::_S_udigits]
344 && __p < &__lits[__cache_type::_S_udigits + __base]))
346 __xtrc[__pos++] = __c;
352 else if (__c == __fmt->_M_thousands_sep
353 && __fmt->_M_use_grouping)
355 // NB: Thousands separator at the beginning of a string
356 // is a no-no, as is two consecutive thousands
360 __grp += static_cast<char>(__sep_pos);
365 __err |= ios_base::failbit;
371 // Digit grouping is checked. If _M_groupings() doesn't
372 // match, then get very very upset, and set failbit.
373 if (__fmt->_M_use_grouping && !__grp.empty())
375 // Add the ending grouping
376 __grp += static_cast<char>(__sep_pos);
378 // __grp is parsed L to R
379 // 1,222,444 == __grp of "/1/3/3"
380 // __fmt->_M_grouping is parsed R to L
381 // 1,222,444 == __fmt->_M_grouping of "/3" == "/3/3/3"
384 const int __len = __fmt->_M_grouping.size();
385 int __n = __grp.size();
388 // Parsed number groupings have to match the
389 // numpunct::grouping string exactly, starting at the
390 // right-most point of the parsed sequence of elements ...
391 while (__test && __i < __n - 1)
392 for (__j = 0; __test && __j < __len && __i < __n - 1; ++__j,++__i)
393 __test &= __fmt->_M_grouping[__j] == __grp[__n - __i - 1];
394 // ... but the last parsed grouping can be <= numpunct
396 __j == __len ? __j = 0 : __j;
397 __test &= __fmt->_M_grouping[__j] >= __grp[__n - __i - 1];
401 __err |= ios_base::failbit;
402 __xtrc[__pos] = '\0';
404 __err |= ios_base::eofbit;
409 // If there was nothing but zeros, put one in the output string
410 if (__testzero && (__pos == 0 || (__pos == 1 && __testsign)))
411 __xtrc[__pos++] = __lits[__cache_type::_S_digits];
413 // That's it for integer types. Remaining code is for floating point
414 if (__fp && __beg != __end)
417 // Check first for decimal point. There MUST be one if
418 // __testunits is false.
419 bool __testdec = false; // Is there a decimal point
420 // with digits following it?
421 if (__c == __fmt->_M_decimal_point)
423 __xtrc[__pos++] = '.';
425 // Now we get any digits after the decimal point
426 // There MUST be some if __testunits is false.
427 while (__beg != __end)
430 const char* __p = strchr(__fmt->_S_literals, __c);
431 if ((__p >= &__lits[__cache_type::_S_digits]
432 && __p < &__lits[__cache_type::_S_digits + __base])
433 || (__p >= &__lits[__cache_type::_S_udigits]
434 && __p < &__lits[__cache_type::_S_udigits + __base]))
436 __xtrc[__pos++] = __c;
444 if (!__testunits && !__testdec) // Ill formed
446 __err |= ios_base::failbit;
447 __xtrc[__pos] = '\0';
449 __err |= ios_base::eofbit;
453 // Now we may find an exponent
457 if ((__c == __lits[__cache_type::_S_ee])
458 || (__c == __lits[__cache_type::_S_Ee]))
460 __xtrc[__pos++] = __c;
462 // Now there may be a sign
466 if ((__c == __lits[__cache_type::_S_minus])
467 || (__c == __lits[__cache_type::_S_plus]))
469 __xtrc[__pos++] = __c;
471 // whitespace may follow a sign
472 while ((__beg != __end) && (isspace(*__beg)))
477 // And now there must be some digits
480 __xtrc[__pos] = '\0';
481 __err |= (ios_base::eofbit | ios_base::failbit);
484 while (__beg != __end)
487 const char* __p = strchr(__fmt->_S_literals, __c);
488 if ((__p >= &__lits[__cache_type::_S_digits]
489 && __p < &__lits[__cache_type::_S_digits + __base])
490 || (__p >= &__lits[__cache_type::_S_udigits]
491 && __p < &__lits[__cache_type::_S_udigits + __base]))
493 __xtrc[__pos++] = __c;
501 // Finally, that's it for floating point
505 __xtrc[__pos] = '\0';
507 __err |= ios_base::eofbit;
510 // The following code uses sprintf() to convert floating point
511 // values for insertion into a stream. The current implementation
512 // replicates the code in _S_pad_numeric() (in _S_output_float()) in
513 // order to prevent having to create a "wide" buffer in addition to
514 // the "narrow" buffer passed to sprintf(). An optimization would be
515 // to replace sprintf() with code that works directly on a wide
516 // buffer and then use _S_pad_numeric() to do the padding. It would
517 // be good to replace sprintf() anyway to avoid accidental buffer
518 // overruns and to gain back the efficiency that C++ provides by
519 // knowing up front the type of the values to insert. This
520 // implementation follows the C++ standard fairly directly as
521 // outlined in 22.2.2.2 [lib.locale.num.put]
523 _S_build_float_format(ios_base& __io, char* __fptr, char __modifier,
526 bool __incl_prec = false;
527 ios_base::fmtflags __flags = __io.flags();
529 // [22.2.2.2.2] Table 60
530 if (__flags & ios_base::showpos)
532 if (__flags & ios_base::showpoint)
534 // As per [22.2.2.2.2.11]
535 if (__flags & ios_base::fixed || __prec > 0)
542 *__fptr++ = __modifier;
543 ios_base::fmtflags __fltfield = __flags & ios_base::floatfield;
544 // [22.2.2.2.2] Table 58
545 if (__fltfield == ios_base::fixed)
547 else if (__fltfield == ios_base::scientific)
548 *__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e';
550 *__fptr++ = (__flags & ios_base::uppercase) ? 'G' : 'g';
556 locale::locale(_Impl* __ip) throw()
558 { __ip->_M_add_reference(); }
561 locale::locale(const char* __name)
565 if (strcmp(__name, "C") == 0 || strcmp(__name, "POSIX") == 0)
566 (_M_impl = _S_classic)->_M_add_reference();
569 // XXX Named locale support not finished.
570 // _M_impl = new _Impl(_S_facets_num, 1, true, __name);
571 _M_impl = new _Impl(*_S_classic, __name, all, 1);
574 throw runtime_error("attempt to create named locale from NULL name");
577 locale::locale(const locale& __other, const char* __name, category __cat)
581 if (__other.name() == __name)
582 (_M_impl = __other._M_impl)->_M_add_reference();
585 _M_impl = new _Impl(*__other._M_impl, __name, __cat, 1);
588 throw runtime_error("attempt to create locale from NULL named locale");
591 locale::locale(const locale& __other, const locale& __one, category __cat)
593 __cat = _S_normalize_category(__cat); // might throw
594 _M_impl = new _Impl(*__other._M_impl, 1); // might throw
597 _M_impl->_M_replace_categories(__one._M_impl, __cat);
600 _M_impl->_M_remove_reference();
605 // _M_impl->_M_cached_name_ok = false;
606 if (!__other._M_impl->_M_has_name)
607 _M_impl->_M_has_name = false;
611 locale::operator==(const locale& __rhs) const throw()
613 return((this->name() != "*" && this->name() == __rhs.name())
614 || _M_impl == __rhs._M_impl);
618 locale::operator=(const locale& __other) throw()
620 __other._M_impl->_M_add_reference();
621 _M_impl->_M_remove_reference();
622 _M_impl = __other._M_impl;
627 locale::global(const locale& __other)
631 locale __keep(_S_global);
632 __other._M_impl->_M_add_reference();
633 _S_global->_M_remove_reference();
634 _S_global = __other._M_impl;
635 if (_S_global->_M_has_name)
636 setlocale(LC_ALL, __other.name().c_str());
642 { return _M_impl->_M_name; }
647 static locale* __classic_locale;
652 // 26 Standard facets, 2 references.
653 // One reference for _M_classic, one for _M_global
654 _S_classic = new _Impl(_S_facets_num, 2, true, "C");
655 _S_global = _S_classic;
657 _S_classic->_M_facet_init(new std::collate<char>);
658 _S_classic->_M_facet_init(new std::ctype<char>);
659 _S_classic->_M_facet_init(new codecvt<char, char, mbstate_t>);
660 _S_classic->_M_facet_init(new moneypunct<char, false>);
661 _S_classic->_M_facet_init(new moneypunct<char,true >);
662 _S_classic->_M_facet_init(new money_get<char>);
663 _S_classic->_M_facet_init(new money_put<char>);
664 _S_classic->_M_facet_init(new numpunct<char>);
665 _S_classic->_M_facet_init(new num_get<char>);
666 _S_classic->_M_facet_init(new num_put<char>);
667 _S_classic->_M_facet_init(new time_get<char>);
668 _S_classic->_M_facet_init(new time_put<char>);
669 _S_classic->_M_facet_init(new std::messages<char>);
671 #ifdef _GLIBCPP_USE_WCHAR_T
672 _S_classic->_M_facet_init(new std::collate<wchar_t>);
673 _S_classic->_M_facet_init(new std::ctype<wchar_t>);
674 _S_classic->_M_facet_init(new codecvt<wchar_t, char, mbstate_t>);
675 _S_classic->_M_facet_init(new moneypunct<wchar_t, false>);
676 _S_classic->_M_facet_init(new moneypunct<wchar_t,true >);
677 _S_classic->_M_facet_init(new money_get<wchar_t>);
678 _S_classic->_M_facet_init(new money_put<wchar_t>);
679 _S_classic->_M_facet_init(new numpunct<wchar_t>);
680 _S_classic->_M_facet_init(new num_get<wchar_t>);
681 _S_classic->_M_facet_init(new num_put<wchar_t>);
682 _S_classic->_M_facet_init(new time_get<wchar_t>);
683 _S_classic->_M_facet_init(new time_put<wchar_t>);
684 _S_classic->_M_facet_init(new std::messages<wchar_t>);
687 // Finesse static init order hassles
688 __classic_locale = new locale(_S_classic);
691 delete __classic_locale;
694 _S_classic->_M_remove_reference();
695 _S_global->_M_remove_reference();
697 _S_classic = _S_global = 0;
702 return *__classic_locale;
706 locale::_S_normalize_category(int __cat)
709 if ((__cat & all) && !(__cat & ~all))
713 // NB: May be a C-style "LC_ALL" category; convert.
731 #ifdef _GLIBCPP_HAVE_LC_MESSAGES
740 throw runtime_error("bad locale category");
747 facet(size_t __refs) throw()
748 : _M_references(__refs - 1)
753 _M_add_reference() throw()
761 _M_remove_reference() throw()
763 if (this && _M_references-- == 0)
776 { return "_Bad_use_facet thrown from use_facet"; }
779 ~_Bad_use_facet() throw() { }
781 // Platform-specific initialization code for ctype tables.
782 #include <bits/ctype_noninline.h>
784 locale::id ctype<char>::id;
786 const size_t ctype<char>::table_size;
788 ctype<char>::~ctype()
789 { if (_M_del) delete[] this->table(); }
792 ctype<char>::do_widen(char __c) const
796 ctype<char>::do_widen(const char* __low, const char* __high,
799 memcpy(__dest, __low, __high - __low);
804 ctype<char>::do_narrow(char __c, char /*__dfault*/) const
808 ctype<char>::do_narrow(const char* __low, const char* __high,
809 char /*__dfault*/, char* __dest) const
811 memcpy(__dest, __low, __high - __low);
815 ctype_byname<char>::ctype_byname(const char* /*__s*/, size_t __refs)
816 : ctype<char>(new mask[table_size], true, __refs)
819 locale::id collate<char>::id;
821 collate<char>::collate(size_t __refs)
822 : _Collate<char>(__refs) { }
824 collate<char>::~collate() { }
827 collate<char>::do_compare(const char* __lo1, const char* __hi1,
828 const char* __lo2, const char* __hi2) const
830 for (; __lo1 < __hi1 && __lo2 < __hi2; ++__lo1, ++__lo2)
831 if (*__lo1 != *__lo2)
832 return (*__lo1 < *__lo2) ? -1 : 1;
835 else if (__lo2 < __hi2)
843 do_transform(const char* __lo, const char* __hi) const
844 { return string(__lo, __hi - __lo); }
848 do_hash(const char* __lo, const char* __hi) const
850 unsigned long __val = 0xdeadbeef;
851 for (; __lo < __hi; ++__lo)
852 __val = *__lo ^ ((__val << 7) &
853 (__val >> (numeric_limits<unsigned long>::digits - 1)));
857 collate_byname<char>::collate_byname(const char* /*__s*/, size_t __refs)
858 : collate<char>(__refs) { }
860 numpunct_byname<char>::numpunct_byname(const char* /*__s*/, size_t __refs)
861 : numpunct<char>(__refs) { }
863 moneypunct_byname<char, false>::moneypunct_byname(const char* /*__s*/,
865 : moneypunct<char, false>(__refs) { }
867 moneypunct_byname<char, true>::moneypunct_byname(const char* /*__s*/,
869 : moneypunct<char, true>(__refs) { }
871 messages_byname<char>::
872 messages_byname(const char* /*__s*/, size_t __refs)
873 : messages<char>(__refs) { }
875 #ifdef _GLIBCPP_USE_WCHAR_T
876 locale::id ctype<wchar_t>::id;
881 // NB: These ctype<wchar_t> methods are not configuration-specific,
882 // unlike the ctype<char> bits.
883 ctype<wchar_t>::ctype(size_t __refs) : _Ctype<wchar_t>(__refs) { }
886 ctype<wchar_t>::do_toupper(wchar_t __c) const
887 { return towupper(__c); }
890 ctype<wchar_t>::do_toupper(wchar_t* __low, const wchar_t* __high) const
892 while (__low < __high)
894 *__low = towupper(*__low);
901 ctype<wchar_t>::do_tolower(wchar_t __c) const
902 { return towlower(__c); }
905 ctype<wchar_t>::do_tolower(wchar_t* __low, const wchar_t* __high) const
907 while (__low < __high)
909 *__low = towlower(*__low);
917 do_is(mask __m, char_type __c) const
918 { return static_cast<bool>(iswctype(__c, _M_convert_to_wmask(__m))); }
922 do_is(const wchar_t* __low, const wchar_t* __high, mask* __m) const
924 while (__low < __high && !this->is(*__m, *__low))
931 do_scan_is(mask __m, const wchar_t* __low, const wchar_t* __high) const
933 while (__low < __high && !this->is(__m, *__low))
940 do_scan_not(mask __m, const char_type* __low, const char_type* __high) const
942 while (__low < __high && this->is(__m, *__low) != 0)
949 do_widen(char __c) const
950 { return btowc(__c); }
954 do_widen(const char* __low, const char* __high, wchar_t* __dest) const
957 memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
958 mbsrtowcs(__dest, &__low, __high - __low, &__state);
964 do_narrow(wchar_t __wc, char __dfault) const
966 int __c = wctob(__wc);
967 return (__c == EOF ? __dfault : static_cast<char>(__c));
972 do_narrow(const wchar_t* __low, const wchar_t* __high, char __dfault,
976 memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
977 size_t __len = __high - __low;
978 size_t __conv = wcsrtombs(__dest, &__low, __len, &__state);
984 ctype_byname<wchar_t>::
985 ctype_byname(const char* /*__s*/, size_t __refs)
986 : ctype<wchar_t>(__refs) { }
988 locale::id collate<wchar_t>::id;
991 collate(size_t __refs)
992 : _Collate<wchar_t> (__refs) { }
999 do_compare(const wchar_t* /*__lo1*/, const wchar_t* /*__hi1*/,
1000 const wchar_t* /*__lo2*/, const wchar_t* /*__hi2*/) const
1002 return 0; // XXX not done
1005 wstring collate<wchar_t>::
1006 do_transform(const wchar_t* /*__lo*/, const wchar_t* /*__hi*/) const
1008 return wstring(); // XXX not done
1011 long collate<wchar_t>::
1012 do_hash(const wchar_t* /*__lo*/, const wchar_t* /*__hi*/) const
1014 return 0; // XXX not done
1017 numpunct_byname<wchar_t>::
1018 numpunct_byname(const char* /*__s*/, size_t __refs)
1019 : numpunct<wchar_t> (__refs) { }
1021 collate_byname<wchar_t>::
1022 collate_byname(const char* /*__s*/, size_t __refs)
1023 : collate<wchar_t> (__refs) { }
1025 moneypunct_byname<wchar_t, false>::
1026 moneypunct_byname(const char* /*__s*/, size_t __refs)
1027 : moneypunct<wchar_t, false> (__refs) { }
1029 moneypunct_byname<wchar_t, true>::
1030 moneypunct_byname(const char* /*__s*/, size_t __refs)
1031 : moneypunct<wchar_t, true> (__refs) { }
1033 messages_byname<wchar_t>::
1034 messages_byname(const char* /*__s*/, size_t __refs)
1035 : messages<wchar_t> (__refs) { }
1036 #endif // _GLIBCPP_USE_WCHAR_T