34#ifndef _LOCALE_CLASSES_TCC
35#define _LOCALE_CLASSES_TCC 1
37#pragma GCC system_header
39namespace std _GLIBCXX_VISIBILITY(default)
41_GLIBCXX_BEGIN_NAMESPACE_VERSION
43 template<
typename _Facet>
47 _M_impl =
new _Impl(*__other._M_impl, 1);
50 { _M_impl->_M_install_facet(&_Facet::id, __f); }
53 _M_impl->_M_remove_reference();
54 __throw_exception_again;
56 delete [] _M_impl->_M_names[0];
57 _M_impl->_M_names[0] = 0;
60 template<
typename _Facet>
65 _Impl*
__tmp =
new _Impl(*_M_impl, 1);
68 __tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
72 __tmp->_M_remove_reference();
73 __throw_exception_again;
78 template<
typename _CharT,
typename _Traits,
typename _Alloc>
102 template<
typename _Facet>
110#ifdef _GLIBCXX_USE_WCHAR_T
117 const size_t __i = _Facet::id._M_id();
141 template<
typename _Facet>
145 const size_t __i = _Facet::id._M_id();
152#ifdef _GLIBCXX_USE_WCHAR_T
170 template<
typename _CharT>
176 template<
typename _CharT>
178 collate<_CharT>::_M_transform(_CharT*,
const _CharT*,
size_t)
const throw ()
181 template<
typename _CharT>
185 const _CharT*
__lo2,
const _CharT*
__hi2)
const
192 const _CharT* __p =
__one.c_str();
194 const _CharT* __q =
__two.c_str();
202 const int __res = _M_compare(__p, __q);
220 template<
typename _CharT>
230 const _CharT* __p =
__str.c_str();
235 _CharT* __c =
new _CharT[
__len];
251 delete [] __c, __c = 0;
252 __c =
new _CharT[
__len];
262 __ret.push_back(_CharT());
268 __throw_exception_again;
276 template<
typename _CharT>
281 unsigned long __val = 0;
284 *
__lo + ((__val << 7)
285 | (__val >> (__gnu_cxx::__numeric_traits<unsigned long>::
287 return static_cast<long>(__val);
292#if _GLIBCXX_EXTERN_TEMPLATE
304#ifdef _GLIBCXX_USE_WCHAR_T
318_GLIBCXX_END_NAMESPACE_VERSION
bool has_facet(const locale &__loc)
Test for the presence of a facet.
const _Facet & use_facet(const locale &__loc)
Return a facet.
ISO C++ entities toplevel namespace is std.
Basis for explicit traits specializations.
Container class for localization functionality.
locale combine(const locale &__other) const
Construct locale with another facet.
bool operator()(const basic_string< _Char, _Traits, _Alloc > &__s1, const basic_string< _Char, _Traits, _Alloc > &__s2) const
Compare two strings according to collate.
locale()
Default constructor.
Localization functionality base class.
Facet for localized string comparison.
virtual long do_hash(const _CharT *__lo, const _CharT *__hi) const
Return hash of a string.
virtual string_type do_transform(const _CharT *__lo, const _CharT *__hi) const
Transform string to comparable form.
virtual int do_compare(const _CharT *__lo1, const _CharT *__hi1, const _CharT *__lo2, const _CharT *__hi2) const
Compare two strings.