32#ifndef _RWSTD_LOC_LOCALE_INCLUDED
33#define _RWSTD_LOC_LOCALE_INCLUDED
44enum __rw_locale_category {
45 __rw_cat_none = 0x0100,
46 __rw_cat_collate = 0x0200,
47 __rw_cat_ctype = 0x0400,
48 __rw_cat_monetary = 0x0800,
49 __rw_cat_numeric = 0x1000,
50 __rw_cat_time = 0x2000,
51 __rw_cat_messages = 0x4000,
58inline const __rw_facet*
59__rw_get_std_facet (
const _STD::locale&, __rw_facet::_C_facet_type,
60 __rw_facet::_C_ctor_t*);
62inline const __rw_facet*
63__rw_get_facet_by_id (
const _STD::locale&,
69template <
class _Facet>
70inline const __rw_facet*
71__rw_get_facet (
const _STD::locale&,
const _Facet*);
80template <
class _Facet>
87 const _RW::__rw_facet*
const __pfacet =
88 _RW::__rw_get_facet (__loc, (
_Facet*)0);
99template <
class _Facet>
104 const _RW::__rw_facet*
const __pfacet =
105 _RW::__rw_get_facet (__loc, (
_Facet*)0);
107 return 0 != __pfacet;
112_EXPORT template <
class _InternT,
class _ExternT,
class _StateT>
121_EXPORT template <
class _CharT,
class _Iter>
124_EXPORT template <
class _CharT,
class _Iter>
127_EXPORT template <
class _CharT,
bool _Intl>
130_EXPORT template <
class _CharT,
class _Iter>
133_EXPORT template <
class _CharT,
class _Iter>
139_EXPORT template <
class _CharT,
class _Iter>
142_EXPORT template <
class _CharT,
class _Iter>
153 typedef int category;
156 typedef _RW::__rw_facet facet;
159 typedef _RW::__rw_facet_id id;
184 template <
class _Facet>
185 locale (
const locale&,
_Facet*);
187#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
190 template <
class _Facet>
191 locale combine (
const locale&)
const;
196 template <
class _CharT,
class _Traits,
class _Allocator>
197 bool operator() (
const basic_string<_CharT, _Traits, _Allocator>&,
198 const basic_string<_CharT, _Traits, _Allocator>&)
const;
217 return !(*
this == __rhs);
230 : _C_body (&__rhs) { }
234 _RW::__rw_locale *_C_body;
236#if defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x540
246 _C_get_facet (
const id&)
const;
249 _C_get_std_facet (facet::_C_facet_type, facet::_C_ctor_t*)
const;
251 friend class _RW::__rw_locale;
252 friend struct _RW::__rw_access;
257 _RW::__rw_get_std_facet (
const _STD::locale&,
258 _RW::__rw_facet::_C_facet_type,
259 _RW::__rw_facet::_C_ctor_t*);
261 friend const _RW::__rw_facet*
262 _RW::__rw_get_facet_by_id (
const _STD::locale&,
263 const _RW::__rw_facet_id&,
264 const _RW::__rw_facet*);
272inline const __rw_facet*
273__rw_get_facet_by_id (
const _STD::locale &__loc,
274 const __rw_facet_id &__id,
278 return __loc._C_get_facet (__id);
282template <
class _Facet>
283inline const __rw_facet*
284__rw_get_facet (
const _STD::locale &__loc,
const _Facet *__dummy)
289 const __rw_facet*
const __pfacet =
290 __rw_get_facet_by_id (__loc, _Facet::id, __dummy);
296inline const __rw_facet*
297__rw_get_std_facet (
const _STD::locale &__loc,
298 __rw_facet::_C_facet_type __type,
299 __rw_facet::_C_ctor_t *__ctor)
303 __rw_facet *__facets [__rw_facet::_C_last_type / 2];
306 const _Facets*
const __pfacets =
311 const __rw_facet *__facet = __pfacets->__facets [__type >> 1];
314 __facet = __loc._C_get_std_facet (__type, __ctor);
316#if !defined (__HP_aCC) || _RWSTD_HP_aCC_MINOR > 3800
331_RWSTD_EXPORT __rw_facet* __rw_ct_ctype (_RWSTD_SIZE_T,
const char*);
332_RWSTD_EXPORT __rw_facet* __rw_ct_numpunct (_RWSTD_SIZE_T,
const char*);
333_RWSTD_EXPORT __rw_facet* __rw_ct_num_get (_RWSTD_SIZE_T,
const char*);
334_RWSTD_EXPORT __rw_facet* __rw_ct_num_put (_RWSTD_SIZE_T,
const char*);
337#define _RWSTD_OVERLOAD_GET_FACET(F) \
338 _RWSTD_EXPORT const __rw_facet* \
339 __rw_get_facet_by_id (const _STD::locale&, \
340 const __rw_facet_id&, const F*)
342#define _Facet(name, T, U) _STD::name<T, U >
344#define _InIter(T) _STD::istreambuf_iterator< T, _STD::char_traits<T > >
345#define _OutIter(T) _STD::ostreambuf_iterator< T, _STD::char_traits<T > >
348typedef _STD::codecvt<char, char, _RWSTD_MBSTATE_T> __rw_codecvt_c;
349typedef _Facet (moneypunct,
char,
false) __rw_mpunct_c_0;
350typedef
_Facet (moneypunct,
char,
true) __rw_mpunct_c_1;
363inline const __rw_facet*
364__rw_get_facet (const
_STD::locale &__loc, const
_STD::ctype<
char>*)
366 return __rw_get_std_facet (__loc, __rw_facet::_C_ctype,
372inline const __rw_facet*
373__rw_get_facet (
const _STD::locale &__loc,
const _STD::numpunct<char>*)
375 return __rw_get_std_facet (__loc, __rw_facet::_C_numpunct,
381inline const __rw_facet*
382__rw_get_facet (
const _STD::locale &__loc,
const __rw_nget_c*)
384 return __rw_get_std_facet (__loc, __rw_facet::_C_num_get,
390inline const __rw_facet*
391__rw_get_facet (
const _STD::locale &__loc,
const __rw_nput_c*)
393 return __rw_get_std_facet (__loc, __rw_facet::_C_num_put,
413#ifndef _RWSTD_NO_WCHAR_T
415typedef _STD::codecvt<wchar_t, char, _RWSTD_MBSTATE_T> __rw_codecvt_w;
416typedef _Facet (moneypunct,
wchar_t,
false) __rw_mpunct_w_0;
417typedef
_Facet (moneypunct,
wchar_t,
true) __rw_mpunct_w_1;
418typedef
_Facet (money_get,
wchar_t,
_InIter (
wchar_t)) __rw_mget_w;
419typedef
_Facet (money_put,
wchar_t,
_OutIter (
wchar_t)) __rw_mput_w;
420typedef
_Facet (num_get,
wchar_t,
_InIter (
wchar_t)) __rw_nget_w;
422typedef
_Facet (time_get,
wchar_t,
_InIter (
wchar_t)) __rw_tget_w;
423typedef
_Facet (time_put,
wchar_t,
_OutIter (
wchar_t)) __rw_tput_w;
442#undef _RWSTD_OVERLOAD_GET_FACET
454template <
class _Facet>
455inline locale::locale (
const locale &__rhs,
_Facet *__facet)
459 if (__facet && !__facet->_C_pid) {
470 if (_RW::__rw_get_facet (__rhs, (
_Facet*)0) == __facet)
473 *
this = locale (*__rhs._C_body, __facet);
477#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
479template <
class _Facet>
480inline locale locale::combine (
const locale &__rhs)
const
487 _Facet::id._C_id, __rhs.name ().c_str ()));
489 return locale (*
this, &use_facet<_Facet>(__rhs));
495template <
class _CharT,
class _Traits,
class _Allocator>
497locale::operator() (
const basic_string<_CharT, _Traits, _Allocator> &__x,
498 const basic_string<_CharT, _Traits, _Allocator> &__y)
const
501 return use_facet<_STD::collate<_CharT> >(*this)
502 .compare (__x.data (), __x.data () + __x.length (),
503 __y.data (), __y.data () + __y.length ()) < 0;
#define _RWSTD_CLASS_EXPORT
#define _RWSTD_REQUIRES(pred, args)
#define _RWSTD_DUMMY_ARG(ignore)
#define _RWSTD_MEMBER_EXPORT
#define _RWSTD_DYNAMIC_CAST(T, x)
#define _RWSTD_REINTERPRET_CAST(T, x)
#define _RWSTD_STATIC_CAST(T, x)
#define _RWSTD_NAMESPACE(name)
#define _RWSTD_FUNC(ignore)
#define _RWSTD_ASSERT(ignore)
#define _RWSTD_STATIC_CONST(type, init)
#define _RWSTD_CONST_CAST(T, x)
#define _RWSTD_SPECIALIZED_FUNCTION
#define _RWSTD_ERROR_FACET_NOT_FOUND
#define _RWSTD_ERROR_BAD_CAST
#define _RWSTD_OVERLOAD_GET_FACET(F)
#define _Facet(name, T, U)
bool operator==(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
bool operator!=(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept