34 #ifndef _LOCALE_FACETS_H 35 #define _LOCALE_FACETS_H 1 37 #ifdef _GLIBCXX_SYSHDR 38 #pragma GCC system_header 52 namespace std _GLIBCXX_VISIBILITY(default)
54 _GLIBCXX_BEGIN_NAMESPACE_VERSION
57 #define _GLIBCXX_NUM_FACETS 14 60 #define _GLIBCXX_NUM_CXX11_FACETS (_GLIBCXX_USE_DUAL_ABI ? 8 : 0) 63 #ifdef _GLIBCXX_USE_CHAR8_T 64 # define _GLIBCXX_NUM_UNICODE_FACETS 4 66 # define _GLIBCXX_NUM_UNICODE_FACETS 2 71 #define _GLIBCXX_NUM_LBDL_ALT128_FACETS (4 + (_GLIBCXX_USE_DUAL_ABI ? 2 : 0)) 76 template<
typename _Tp>
79 const __c_locale&)
throw();
85 const __c_locale&)
throw();
90 const __c_locale&)
throw();
95 const __c_locale&)
throw();
99 template<
typename _CharT,
typename _Traits>
103 _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
112 template<
typename _CharT>
114 __add_grouping(_CharT* __s, _CharT __sep,
115 const char* __gbeg,
size_t __gsize,
116 const _CharT* __first,
const _CharT* __last);
121 template<
typename _CharT>
123 ostreambuf_iterator<_CharT>
124 __write(ostreambuf_iterator<_CharT> __s,
const _CharT* __ws,
int __len)
126 __s._M_put(__ws, __len);
131 template<
typename _CharT,
typename _OutIter>
134 __write(_OutIter __s,
const _CharT* __ws,
int __len)
136 for (
int __j = 0; __j < __len; __j++, ++__s)
154 template<
typename _CharT>
174 is(mask __m, char_type __c)
const 175 {
return this->do_is(__m, __c); }
191 is(
const char_type *__lo,
const char_type *__hi, mask *__vec)
const 192 {
return this->do_is(__lo, __hi, __vec); }
207 scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const 208 {
return this->do_scan_is(__m, __lo, __hi); }
223 scan_not(mask __m,
const char_type* __lo,
const char_type* __hi)
const 224 {
return this->do_scan_not(__m, __lo, __hi); }
238 {
return this->do_toupper(__c); }
252 toupper(char_type *__lo,
const char_type* __hi)
const 253 {
return this->do_toupper(__lo, __hi); }
267 {
return this->do_tolower(__c); }
281 tolower(char_type* __lo,
const char_type* __hi)
const 282 {
return this->do_tolower(__lo, __hi); }
299 {
return this->do_widen(__c); }
317 widen(
const char* __lo,
const char* __hi, char_type* __to)
const 318 {
return this->do_widen(__lo, __hi, __to); }
336 narrow(char_type __c,
char __dfault)
const 337 {
return this->do_narrow(__c, __dfault); }
358 narrow(
const char_type* __lo,
const char_type* __hi,
359 char __dfault,
char* __to)
const 360 {
return this->do_narrow(__lo, __hi, __dfault, __to); }
383 do_is(mask __m, char_type __c)
const = 0;
401 virtual const char_type*
402 do_is(
const char_type* __lo,
const char_type* __hi,
403 mask* __vec)
const = 0;
420 virtual const char_type*
421 do_scan_is(mask __m,
const char_type* __lo,
422 const char_type* __hi)
const = 0;
439 virtual const char_type*
440 do_scan_not(mask __m,
const char_type* __lo,
441 const char_type* __hi)
const = 0;
458 do_toupper(char_type __c)
const = 0;
474 virtual const char_type*
475 do_toupper(char_type* __lo,
const char_type* __hi)
const = 0;
491 do_tolower(char_type __c)
const = 0;
507 virtual const char_type*
508 do_tolower(char_type* __lo,
const char_type* __hi)
const = 0;
527 do_widen(
char __c)
const = 0;
548 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const = 0;
569 do_narrow(char_type __c,
char __dfault)
const = 0;
593 virtual const char_type*
594 do_narrow(
const char_type* __lo,
const char_type* __hi,
595 char __dfault,
char* __to)
const = 0;
616 template<
typename _CharT>
622 typedef typename __ctype_abstract_base<_CharT>::mask mask;
635 do_is(mask __m, char_type __c)
const;
637 virtual const char_type*
638 do_is(
const char_type* __lo,
const char_type* __hi, mask* __vec)
const;
640 virtual const char_type*
641 do_scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const;
643 virtual const char_type*
644 do_scan_not(mask __m,
const char_type* __lo,
645 const char_type* __hi)
const;
648 do_toupper(char_type __c)
const;
650 virtual const char_type*
651 do_toupper(char_type* __lo,
const char_type* __hi)
const;
654 do_tolower(char_type __c)
const;
656 virtual const char_type*
657 do_tolower(char_type* __lo,
const char_type* __hi)
const;
660 do_widen(
char __c)
const;
663 do_widen(
const char* __lo,
const char* __hi, char_type* __dest)
const;
666 do_narrow(char_type,
char __dfault)
const;
668 virtual const char_type*
669 do_narrow(
const char_type* __lo,
const char_type* __hi,
670 char __dfault,
char* __to)
const;
673 template<
typename _CharT>
678 template<
typename _CharT,
typename _Traits,
typename _Alloc>
679 class ctype<basic_string<_CharT, _Traits, _Alloc> >;
700 __c_locale _M_c_locale_ctype;
702 __to_type _M_toupper;
703 __to_type _M_tolower;
704 const mask* _M_table;
705 mutable char _M_widen_ok;
706 mutable char _M_widen[1 +
static_cast<unsigned char>(-1)];
707 mutable char _M_narrow[1 +
static_cast<unsigned char>(-1)];
708 mutable char _M_narrow_ok;
715 static const size_t table_size = 1 +
static_cast<unsigned char>(-1);
728 ctype(
const mask* __table = 0,
bool __del =
false,
size_t __refs = 0);
741 ctype(__c_locale __cloc,
const mask* __table = 0,
bool __del =
false,
754 is(mask __m,
char __c)
const;
769 is(
const char* __lo,
const char* __hi, mask* __vec)
const;
783 scan_is(mask __m,
const char* __lo,
const char* __hi)
const;
797 scan_not(mask __m,
const char* __lo,
const char* __hi)
const;
813 {
return this->do_toupper(__c); }
829 toupper(char_type *__lo,
const char_type* __hi)
const 830 {
return this->do_toupper(__lo, __hi); }
846 {
return this->do_tolower(__c); }
862 tolower(char_type* __lo,
const char_type* __hi)
const 863 {
return this->do_tolower(__lo, __hi); }
885 return _M_widen[
static_cast<unsigned char>(__c)];
886 this->_M_widen_init();
887 return this->do_widen(__c);
909 widen(
const char* __lo,
const char* __hi, char_type* __to)
const 911 if (_M_widen_ok == 1)
913 if (__builtin_expect(__hi != __lo,
true))
914 __builtin_memcpy(__to, __lo, __hi - __lo);
919 return this->do_widen(__lo, __hi, __to);
941 narrow(char_type __c,
char __dfault)
const 943 if (_M_narrow[static_cast<unsigned char>(__c)])
944 return _M_narrow[
static_cast<unsigned char>(__c)];
945 const char __t = do_narrow(__c, __dfault);
947 _M_narrow[
static_cast<unsigned char>(__c)] = __t;
974 narrow(
const char_type* __lo,
const char_type* __hi,
975 char __dfault,
char* __to)
const 977 if (__builtin_expect(_M_narrow_ok == 1,
true))
979 if (__builtin_expect(__hi != __lo,
true))
980 __builtin_memcpy(__to, __lo, __hi - __lo);
985 return this->do_narrow(__lo, __hi, __dfault, __to);
998 classic_table()
throw();
1024 do_toupper(char_type __c)
const;
1040 virtual const char_type*
1041 do_toupper(char_type* __lo,
const char_type* __hi)
const;
1057 do_tolower(char_type __c)
const;
1073 virtual const char_type*
1074 do_tolower(char_type* __lo,
const char_type* __hi)
const;
1117 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const 1119 if (__builtin_expect(__hi != __lo,
true))
1120 __builtin_memcpy(__to, __lo, __hi - __lo);
1144 do_narrow(char_type __c,
char __dfault __attribute__((__unused__)))
const 1169 virtual const char_type*
1171 char __dfault __attribute__((__unused__)),
char* __to)
const 1173 if (__builtin_expect(__hi != __lo,
true))
1174 __builtin_memcpy(__to, __lo, __hi - __lo);
1179 void _M_narrow_init()
const;
1180 void _M_widen_init()
const;
1183 #ifdef _GLIBCXX_USE_WCHAR_T 1202 typedef wctype_t __wmask_type;
1205 __c_locale _M_c_locale_ctype;
1209 char _M_narrow[128];
1210 wint_t _M_widen[1 +
static_cast<unsigned char>(-1)];
1214 __wmask_type _M_wmask[16];
1229 ctype(
size_t __refs = 0);
1240 ctype(__c_locale __cloc,
size_t __refs = 0);
1244 _M_convert_to_wmask(
const mask __m)
const throw();
1264 do_is(mask __m, char_type __c)
const;
1282 virtual const char_type*
1283 do_is(
const char_type* __lo,
const char_type* __hi, mask* __vec)
const;
1300 virtual const char_type*
1301 do_scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const;
1318 virtual const char_type*
1319 do_scan_not(mask __m,
const char_type* __lo,
1320 const char_type* __hi)
const;
1336 do_toupper(char_type __c)
const;
1352 virtual const char_type*
1353 do_toupper(char_type* __lo,
const char_type* __hi)
const;
1369 do_tolower(char_type __c)
const;
1385 virtual const char_type*
1386 do_tolower(char_type* __lo,
const char_type* __hi)
const;
1406 do_widen(
char __c)
const;
1428 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const;
1451 do_narrow(char_type __c,
char __dfault)
const;
1476 virtual const char_type*
1477 do_narrow(
const char_type* __lo,
const char_type* __hi,
1478 char __dfault,
char* __to)
const;
1482 _M_initialize_ctype() throw();
1484 #endif //_GLIBCXX_USE_WCHAR_T 1487 template<
typename _CharT>
1491 typedef typename ctype<_CharT>::mask mask;
1496 #if __cplusplus >= 201103L 1515 #if __cplusplus >= 201103L 1525 #ifdef _GLIBCXX_USE_WCHAR_T 1533 #if __cplusplus >= 201103L 1544 _GLIBCXX_END_NAMESPACE_VERSION
1550 namespace std _GLIBCXX_VISIBILITY(default)
1552 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1567 _S_odigits_end = _S_odigits + 16,
1568 _S_oudigits = _S_odigits_end,
1569 _S_oudigits_end = _S_oudigits + 16,
1570 _S_oe = _S_odigits + 14,
1571 _S_oE = _S_oudigits + 14,
1572 _S_oend = _S_oudigits_end
1580 static const char* _S_atoms_out;
1584 static const char* _S_atoms_in;
1593 _S_ie = _S_izero + 14,
1594 _S_iE = _S_izero + 20,
1601 _S_format_float(
const ios_base& __io,
char* __fptr,
char __mod)
throw();
1604 template<
typename _CharT>
1607 const char* _M_grouping;
1608 size_t _M_grouping_size;
1609 bool _M_use_grouping;
1610 const _CharT* _M_truename;
1611 size_t _M_truename_size;
1612 const _CharT* _M_falsename;
1613 size_t _M_falsename_size;
1614 _CharT _M_decimal_point;
1615 _CharT _M_thousands_sep;
1621 _CharT _M_atoms_out[__num_base::_S_oend];
1627 _CharT _M_atoms_in[__num_base::_S_iend];
1631 __numpunct_cache(
size_t __refs = 0)
1632 : facet(__refs), _M_grouping(0), _M_grouping_size(0),
1633 _M_use_grouping(
false),
1634 _M_truename(0), _M_truename_size(0), _M_falsename(0),
1635 _M_falsename_size(0), _M_decimal_point(_CharT()),
1636 _M_thousands_sep(_CharT()), _M_allocated(
false)
1639 ~__numpunct_cache();
1642 _M_cache(
const locale& __loc);
1646 operator=(
const __numpunct_cache&);
1649 __numpunct_cache(
const __numpunct_cache&);
1652 template<
typename _CharT>
1653 __numpunct_cache<_CharT>::~__numpunct_cache()
1657 delete [] _M_grouping;
1658 delete [] _M_truename;
1659 delete [] _M_falsename;
1663 _GLIBCXX_BEGIN_NAMESPACE_CXX11
1679 template<
typename _CharT>
1689 typedef __numpunct_cache<_CharT> __cache_type;
1692 __cache_type* _M_data;
1705 : facet(__refs), _M_data(0)
1706 { _M_initialize_numpunct(); }
1719 : facet(__refs), _M_data(__cache)
1720 { _M_initialize_numpunct(); }
1733 : facet(__refs), _M_data(0)
1734 { _M_initialize_numpunct(__cloc); }
1747 {
return this->do_decimal_point(); }
1760 {
return this->do_thousands_sep(); }
1791 {
return this->do_grouping(); }
1804 {
return this->do_truename(); }
1817 {
return this->do_falsename(); }
1834 {
return _M_data->_M_decimal_point; }
1846 {
return _M_data->_M_thousands_sep; }
1859 {
return _M_data->_M_grouping; }
1872 {
return _M_data->_M_truename; }
1885 {
return _M_data->_M_falsename; }
1889 _M_initialize_numpunct(__c_locale __cloc = 0);
1892 template<
typename _CharT>
1902 #ifdef _GLIBCXX_USE_WCHAR_T 1912 template<
typename _CharT>
1916 typedef _CharT char_type;
1923 if (__builtin_strcmp(__s,
"C") != 0
1924 && __builtin_strcmp(__s,
"POSIX") != 0)
1927 this->_S_create_c_locale(__tmp, __s);
1928 this->_M_initialize_numpunct(__tmp);
1929 this->_S_destroy_c_locale(__tmp);
1933 #if __cplusplus >= 201103L 1944 _GLIBCXX_END_NAMESPACE_CXX11
1946 _GLIBCXX_BEGIN_NAMESPACE_LDBL
1961 template<
typename _CharT,
typename _InIter>
2010 ios_base::iostate& __err,
bool& __v)
const 2011 {
return this->do_get(__in, __end, __io, __err, __v); }
2047 ios_base::iostate& __err,
long& __v)
const 2048 {
return this->do_get(__in, __end, __io, __err, __v); }
2052 ios_base::iostate& __err,
unsigned short& __v)
const 2053 {
return this->do_get(__in, __end, __io, __err, __v); }
2057 ios_base::iostate& __err,
unsigned int& __v)
const 2058 {
return this->do_get(__in, __end, __io, __err, __v); }
2062 ios_base::iostate& __err,
unsigned long& __v)
const 2063 {
return this->do_get(__in, __end, __io, __err, __v); }
2065 #ifdef _GLIBCXX_USE_LONG_LONG 2066 #pragma GCC diagnostic push 2067 #pragma GCC diagnostic ignored "-Wlong-long" 2070 ios_base::iostate& __err,
long long& __v)
const 2071 {
return this->do_get(__in, __end, __io, __err, __v); }
2075 ios_base::iostate& __err,
unsigned long long& __v)
const 2076 {
return this->do_get(__in, __end, __io, __err, __v); }
2077 #pragma GCC diagnostic pop 2110 ios_base::iostate& __err,
float& __v)
const 2111 {
return this->do_get(__in, __end, __io, __err, __v); }
2115 ios_base::iostate& __err,
double& __v)
const 2116 {
return this->do_get(__in, __end, __io, __err, __v); }
2120 ios_base::iostate& __err,
long double& __v)
const 2121 {
return this->do_get(__in, __end, __io, __err, __v); }
2153 ios_base::iostate& __err,
void*& __v)
const 2154 {
return this->do_get(__in, __end, __io, __err, __v); }
2160 _GLIBCXX_DEFAULT_ABI_TAG
2162 _M_extract_float(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2165 template<
typename _ValueT>
2166 _GLIBCXX_DEFAULT_ABI_TAG
2168 _M_extract_int(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2171 template<
typename _CharT2>
2172 typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
int>::__type
2173 _M_find(
const _CharT2*,
size_t __len, _CharT2 __c)
const 2178 if (__c >= _CharT2(
'0') && __c < _CharT2(_CharT2(
'0') + __len))
2179 __ret = __c - _CharT2(
'0');
2183 if (__c >= _CharT2(
'0') && __c <= _CharT2(
'9'))
2184 __ret = __c - _CharT2(
'0');
2185 else if (__c >= _CharT2(
'a') && __c <= _CharT2(
'f'))
2186 __ret = 10 + (__c - _CharT2(
'a'));
2187 else if (__c >= _CharT2(
'A') && __c <= _CharT2(
'F'))
2188 __ret = 10 + (__c - _CharT2(
'A'));
2193 template<
typename _CharT2>
2194 typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
2196 _M_find(
const _CharT2* __zero,
size_t __len, _CharT2 __c)
const 2202 __ret = __q - __zero;
2225 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
bool&)
const;
2229 ios_base::iostate& __err,
long& __v)
const 2230 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2234 ios_base::iostate& __err,
unsigned short& __v)
const 2235 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2239 ios_base::iostate& __err,
unsigned int& __v)
const 2240 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2244 ios_base::iostate& __err,
unsigned long& __v)
const 2245 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2247 #ifdef _GLIBCXX_USE_LONG_LONG 2248 #pragma GCC diagnostic push 2249 #pragma GCC diagnostic ignored "-Wlong-long" 2252 ios_base::iostate& __err,
long long& __v)
const 2253 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2257 ios_base::iostate& __err,
unsigned long long& __v)
const 2258 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2259 #pragma GCC diagnostic pop 2263 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
float&)
const;
2266 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2270 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2276 __do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2280 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2281 long double&)
const;
2285 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
void*&)
const;
2288 #if defined _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT \ 2289 && defined __LONG_DOUBLE_IEEE128__ 2294 __do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2299 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2303 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2304 long double&)
const;
2309 template<
typename _CharT,
typename _InIter>
2325 template<
typename _CharT,
typename _OutIter>
2366 {
return this->do_put(__s, __io, __fill, __v); }
2408 {
return this->do_put(__s, __io, __fill, __v); }
2412 unsigned long __v)
const 2413 {
return this->do_put(__s, __io, __fill, __v); }
2415 #ifdef _GLIBCXX_USE_LONG_LONG 2416 #pragma GCC diagnostic push 2417 #pragma GCC diagnostic ignored "-Wlong-long" 2419 put(iter_type __s,
ios_base& __io, char_type __fill,
long long __v)
const 2420 {
return this->do_put(__s, __io, __fill, __v); }
2424 unsigned long long __v)
const 2425 {
return this->do_put(__s, __io, __fill, __v); }
2426 #pragma GCC diagnostic pop 2473 put(iter_type __s,
ios_base& __io, char_type __fill,
double __v)
const 2474 {
return this->do_put(__s, __io, __fill, __v); }
2478 long double __v)
const 2479 {
return this->do_put(__s, __io, __fill, __v); }
2499 const void* __v)
const 2500 {
return this->do_put(__s, __io, __fill, __v); }
2503 template<
typename _ValueT>
2505 _M_insert_float(iter_type,
ios_base& __io, char_type __fill,
2506 char __mod, _ValueT __v)
const;
2509 _M_group_float(
const char* __grouping,
size_t __grouping_size,
2510 char_type __sep,
const char_type* __p, char_type* __new,
2511 char_type* __cs,
int& __len)
const;
2513 template<
typename _ValueT>
2515 _M_insert_int(iter_type,
ios_base& __io, char_type __fill,
2519 _M_group_int(
const char* __grouping,
size_t __grouping_size,
2520 char_type __sep,
ios_base& __io, char_type* __new,
2521 char_type* __cs,
int& __len)
const;
2525 char_type* __new,
const char_type* __cs,
int& __len)
const;
2546 do_put(iter_type __s,
ios_base& __io, char_type __fill,
bool __v)
const;
2550 {
return _M_insert_int(__s, __io, __fill, __v); }
2554 unsigned long __v)
const 2555 {
return _M_insert_int(__s, __io, __fill, __v); }
2557 #ifdef _GLIBCXX_USE_LONG_LONG 2558 #pragma GCC diagnostic push 2559 #pragma GCC diagnostic ignored "-Wlong-long" 2562 long long __v)
const 2563 {
return _M_insert_int(__s, __io, __fill, __v); }
2567 unsigned long long __v)
const 2568 {
return _M_insert_int(__s, __io, __fill, __v); }
2569 #pragma GCC diagnostic pop 2573 do_put(iter_type,
ios_base&, char_type,
double)
const;
2576 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2578 __do_put(iter_type,
ios_base&, char_type,
double)
const;
2581 do_put(iter_type,
ios_base&, char_type,
long double)
const;
2585 do_put(iter_type,
ios_base&, char_type,
const void*)
const;
2588 #if defined _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT \ 2589 && defined __LONG_DOUBLE_IEEE128__ 2591 __do_put(iter_type,
ios_base&, char_type, __ibm128)
const;
2595 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2597 do_put(iter_type,
ios_base&, char_type,
long double)
const;
2602 template <
typename _CharT,
typename _OutIter>
2605 _GLIBCXX_END_NAMESPACE_LDBL
2613 template<
typename _CharT>
2616 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
2619 template<
typename _CharT>
2622 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
2625 template<
typename _CharT>
2628 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
2631 template<
typename _CharT>
2634 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
2637 template<
typename _CharT>
2640 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
2643 template<
typename _CharT>
2646 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
2649 template<
typename _CharT>
2652 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
2655 template<
typename _CharT>
2658 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
2661 template<
typename _CharT>
2664 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
2667 template<
typename _CharT>
2670 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
2673 template<
typename _CharT>
2676 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
2678 #if __cplusplus >= 201103L 2680 template<
typename _CharT>
2683 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::blank, __c); }
2687 template<
typename _CharT>
2690 {
return use_facet<ctype<_CharT> >(__loc).
toupper(__c); }
2693 template<
typename _CharT>
2696 {
return use_facet<ctype<_CharT> >(__loc).
tolower(__c); }
2698 _GLIBCXX_END_NAMESPACE_VERSION
static locale::id id
Numpunct facet id.
char_type thousands_sep() const
Return thousands separator character.
_Ios_Iostate iostate
This is a bitmask type.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned int &__v) const
Numeric parsing.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
bool isalnum(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alnum, __c).
num_put(size_t __refs=0)
Constructor performs initialization.
virtual char do_narrow(char_type __c, char __dfault) const
Narrow char.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, const void *__v) const
Numeric formatting.
bool islower(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::lower, __c).
virtual ~num_get()
Destructor.
static locale::id id
Numpunct facet id.
char narrow(char_type __c, char __dfault) const
Narrow char_type to char.
_InIter iter_type
Public typedefs.
bool isprint(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::print, __c).
bool is(mask __m, char_type __c) const
Test char_type classification.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned long long &__v) const
Numeric parsing.
Primary class template num_get.This facet encapsulates the code to parse and return a number from a s...
char_type widen(char __c) const
Widen char to char_type.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, bool __v) const
Numeric formatting.
bool isspace(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::space, __c).
string_type falsename() const
Return string representation of bool false.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
_OutIter iter_type
Public typedefs.
Localization functionality base class.The facet class is the base class for a localization feature...
_CharT toupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.toupper(__c).
class ctype_byname [22.2.1.2].
class numpunct_byname [22.2.3.2].
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow char array.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned short &__v) const
Numeric parsing.
virtual ~num_put()
Destructor.
bool isxdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::xdigit, __c).
numpunct(size_t __refs=0)
Numpunct constructor.
char_type decimal_point() const
Return decimal point character.
static locale::id id
The facet id for ctype<char_type>
char narrow(char_type __c, char __dfault) const
Narrow char.
ISO C++ entities toplevel namespace is std.
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow array to char array.
bool isalpha(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alpha, __c).
const char_type * scan_not(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type not matching a mask.
static locale::id id
The facet id for ctype<wchar_t>
_CharT char_type
Typedef for the template parameter.
const mask * table() const
Returns a pointer to the mask table provided to the constructor, or the default from classic_table() ...
numpunct(__c_locale __cloc, size_t __refs=0)
Internal constructor. Not for general use.
Container class for localization functionality.The locale class is first a class wrapper for C librar...
bool ispunct(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::punct, __c).
Primary class template num_put.This facet encapsulates the code to convert a number to a string...
static locale::id id
The facet id for ctype<char>
num_get(size_t __refs=0)
Constructor performs initialization.
numpunct(__cache_type *__cache, size_t __refs=0)
Internal constructor. Not for general use.
char_type toupper(char_type __c) const
Convert to uppercase.
_CharT char_type
Public typedefs.
Primary class template ctype facet.This template class defines classification and conversion function...
char_type tolower(char_type __c) const
Convert to lowercase.
The base of the I/O class hierarchy.This class defines everything that can be defined about I/O that ...
char_type tolower(char_type __c) const
Convert to lowercase.
virtual char_type do_widen(char __c) const
Widen char.
bool isupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::upper, __c).
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
_CharT char_type
Public typedefs.
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen array to char_type.
virtual string do_grouping() const
Return grouping specification.
virtual string_type do_truename() const
Return string representation of bool true.
bool iscntrl(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::cntrl, __c).
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
const char_type * scan_is(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type matching a mask.
Facet ID class.The ID class provides facets with an index used to identify them. Every facet class mu...
bool isblank(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::blank, __c).
char_type toupper(char_type __c) const
Convert to uppercase.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long double __v) const
Numeric formatting.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
virtual const char_type * do_narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow char array to char array.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, double __v) const
Numeric formatting.
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
Common base for ctype facet.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
virtual char_type do_decimal_point() const
Return decimal point character.
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
static locale::id id
Numpunct facet id.
bool isdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::digit, __c).
virtual ~numpunct()
Destructor.
Basis for explicit traits specializations.
virtual const char * do_widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
const char_type * is(const char_type *__lo, const char_type *__hi, mask *__vec) const
Return a mask array.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, long long &__v) const
Numeric parsing.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
basic_string< _CharT > string_type
Public typedefs.
virtual char_type do_thousands_sep() const
Return thousands separator character.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned long &__v) const
Numeric parsing.
bool isgraph(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::graph, __c).
_CharT tolower(_CharT __c, const locale &__loc)
Convenience interface to ctype.tolower(__c).
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
_CharT char_type
Public typedefs.
wchar_t char_type
Typedef for the template parameter wchar_t.
string grouping() const
Return grouping specification.
char_type widen(char __c) const
Widen char.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, long &__v) const
Numeric parsing.
char char_type
Typedef for the template parameter char.
string_type truename() const
Return string representation of bool true.
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
Primary class template numpunct.This facet stores several pieces of information related to printing a...
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
virtual string_type do_falsename() const
Return string representation of bool false.