34 #ifndef _LOCALE_FACETS_H 35 #define _LOCALE_FACETS_H 1 37 #pragma GCC system_header 50 namespace std _GLIBCXX_VISIBILITY(default)
52 _GLIBCXX_BEGIN_NAMESPACE_VERSION
55 #define _GLIBCXX_NUM_FACETS 14 58 #define _GLIBCXX_NUM_CXX11_FACETS (_GLIBCXX_USE_DUAL_ABI ? 8 : 0) 61 #ifdef _GLIBCXX_USE_CHAR8_T 62 # define _GLIBCXX_NUM_UNICODE_FACETS 4 64 # define _GLIBCXX_NUM_UNICODE_FACETS 2 69 #define _GLIBCXX_NUM_LBDL_ALT128_FACETS (4 + (_GLIBCXX_USE_DUAL_ABI ? 2 : 0)) 74 template<
typename _Tp>
77 const __c_locale&)
throw();
83 const __c_locale&)
throw();
88 const __c_locale&)
throw();
93 const __c_locale&)
throw();
97 template<
typename _CharT,
typename _Traits>
101 _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
110 template<
typename _CharT>
112 __add_grouping(_CharT* __s, _CharT __sep,
113 const char* __gbeg,
size_t __gsize,
114 const _CharT* __first,
const _CharT* __last);
119 template<
typename _CharT>
121 ostreambuf_iterator<_CharT>
122 __write(ostreambuf_iterator<_CharT> __s,
const _CharT* __ws,
int __len)
124 __s._M_put(__ws, __len);
129 template<
typename _CharT,
typename _OutIter>
132 __write(_OutIter __s,
const _CharT* __ws,
int __len)
134 for (
int __j = 0; __j < __len; __j++, ++__s)
152 template<
typename _CharT>
173 {
return this->
do_is(__m, __c); }
190 {
return this->
do_is(__lo, __hi, __vec); }
316 {
return this->
do_widen(__lo, __hi, __to); }
335 {
return this->
do_narrow(__c, __dfault); }
357 char __dfault,
char* __to)
const 358 {
return this->
do_narrow(__lo, __hi, __dfault, __to); }
365 ~__ctype_abstract_base() { }
401 mask* __vec)
const = 0;
593 char __dfault,
char* __to)
const = 0;
614 template<
typename _CharT>
620 typedef typename __ctype_abstract_base<_CharT>::mask mask;
633 do_is(mask __m, char_type __c)
const;
635 virtual const char_type*
636 do_is(
const char_type* __lo,
const char_type* __hi, mask* __vec)
const;
638 virtual const char_type*
639 do_scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const;
641 virtual const char_type*
643 const char_type* __hi)
const;
648 virtual const char_type*
649 do_toupper(char_type* __lo,
const char_type* __hi)
const;
654 virtual const char_type*
655 do_tolower(char_type* __lo,
const char_type* __hi)
const;
661 do_widen(
const char* __lo,
const char* __hi, char_type* __dest)
const;
664 do_narrow(char_type,
char __dfault)
const;
666 virtual const char_type*
667 do_narrow(
const char_type* __lo,
const char_type* __hi,
668 char __dfault,
char* __to)
const;
671 template<
typename _CharT>
693 __c_locale _M_c_locale_ctype;
695 __to_type _M_toupper;
696 __to_type _M_tolower;
697 const mask* _M_table;
698 mutable char _M_widen_ok;
699 mutable char _M_widen[1 +
static_cast<unsigned char>(-1)];
700 mutable char _M_narrow[1 +
static_cast<unsigned char>(-1)];
701 mutable char _M_narrow_ok;
708 static const size_t table_size = 1 +
static_cast<unsigned char>(-1);
721 ctype(
const mask* __table = 0,
bool __del =
false,
size_t __refs = 0);
734 ctype(__c_locale __cloc,
const mask* __table = 0,
bool __del =
false,
747 is(mask __m,
char __c)
const;
762 is(
const char* __lo,
const char* __hi, mask* __vec)
const;
776 scan_is(mask __m,
const char* __lo,
const char* __hi)
const;
790 scan_not(mask __m,
const char* __lo,
const char* __hi)
const;
878 return _M_widen[
static_cast<unsigned char>(__c)];
879 this->_M_widen_init();
904 if (_M_widen_ok == 1)
906 if (__builtin_expect(__hi != __lo,
true))
907 __builtin_memcpy(__to, __lo, __hi - __lo);
912 return this->
do_widen(__lo, __hi, __to);
936 if (_M_narrow[static_cast<unsigned char>(__c)])
937 return _M_narrow[
static_cast<unsigned char>(__c)];
938 const char __t =
do_narrow(__c, __dfault);
940 _M_narrow[
static_cast<unsigned char>(__c)] = __t;
968 char __dfault,
char* __to)
const 970 if (__builtin_expect(_M_narrow_ok == 1,
true))
972 if (__builtin_expect(__hi != __lo,
true))
973 __builtin_memcpy(__to, __lo, __hi - __lo);
978 return this->
do_narrow(__lo, __hi, __dfault, __to);
991 classic_table() throw();
1033 virtual const char_type*
1034 do_toupper(char_type* __lo, const char_type* __hi) const;
1066 virtual const char_type*
1067 do_tolower(char_type* __lo, const char_type* __hi) const;
1112 if (__builtin_expect(__hi != __lo,
true))
1113 __builtin_memcpy(__to, __lo, __hi - __lo);
1162 virtual const char_type*
1164 char __dfault __attribute__((__unused__)),
char* __to)
const 1166 if (__builtin_expect(__hi != __lo,
true))
1167 __builtin_memcpy(__to, __lo, __hi - __lo);
1172 void _M_narrow_init()
const;
1173 void _M_widen_init()
const;
1176 #ifdef _GLIBCXX_USE_WCHAR_T 1195 typedef wctype_t __wmask_type;
1198 __c_locale _M_c_locale_ctype;
1202 char _M_narrow[128];
1203 wint_t _M_widen[1 +
static_cast<unsigned char>(-1)];
1207 __wmask_type _M_wmask[16];
1222 ctype(
size_t __refs = 0);
1233 ctype(__c_locale __cloc,
size_t __refs = 0);
1237 _M_convert_to_wmask(
const mask __m)
const throw();
1471 char __dfault,
char* __to)
const;
1475 _M_initialize_ctype() throw();
1477 #endif //_GLIBCXX_USE_WCHAR_T 1480 template<
typename _CharT>
1484 typedef typename ctype<_CharT>::mask mask;
1489 #if __cplusplus >= 201103L 1508 #if __cplusplus >= 201103L 1518 #ifdef _GLIBCXX_USE_WCHAR_T 1526 #if __cplusplus >= 201103L 1537 _GLIBCXX_END_NAMESPACE_VERSION
1543 namespace std _GLIBCXX_VISIBILITY(default)
1545 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1560 _S_odigits_end = _S_odigits + 16,
1561 _S_oudigits = _S_odigits_end,
1562 _S_oudigits_end = _S_oudigits + 16,
1563 _S_oe = _S_odigits + 14,
1564 _S_oE = _S_oudigits + 14,
1565 _S_oend = _S_oudigits_end
1573 static const char* _S_atoms_out;
1577 static const char* _S_atoms_in;
1586 _S_ie = _S_izero + 14,
1587 _S_iE = _S_izero + 20,
1594 _S_format_float(
const ios_base& __io,
char* __fptr,
char __mod)
throw();
1597 template<
typename _CharT>
1598 struct __numpunct_cache :
public locale::facet
1600 const char* _M_grouping;
1601 size_t _M_grouping_size;
1602 bool _M_use_grouping;
1603 const _CharT* _M_truename;
1604 size_t _M_truename_size;
1605 const _CharT* _M_falsename;
1606 size_t _M_falsename_size;
1607 _CharT _M_decimal_point;
1608 _CharT _M_thousands_sep;
1614 _CharT _M_atoms_out[__num_base::_S_oend];
1620 _CharT _M_atoms_in[__num_base::_S_iend];
1624 __numpunct_cache(
size_t __refs = 0)
1625 :
facet(__refs), _M_grouping(0), _M_grouping_size(0),
1626 _M_use_grouping(false),
1627 _M_truename(0), _M_truename_size(0), _M_falsename(0),
1628 _M_falsename_size(0), _M_decimal_point(_CharT()),
1629 _M_thousands_sep(_CharT()), _M_allocated(false)
1632 ~__numpunct_cache();
1635 _M_cache(
const locale& __loc);
1639 operator=(
const __numpunct_cache&);
1642 __numpunct_cache(
const __numpunct_cache&);
1645 template<
typename _CharT>
1646 __numpunct_cache<_CharT>::~__numpunct_cache()
1650 delete [] _M_grouping;
1651 delete [] _M_truename;
1652 delete [] _M_falsename;
1656 _GLIBCXX_BEGIN_NAMESPACE_CXX11
1672 template<
typename _CharT>
1682 typedef __numpunct_cache<_CharT> __cache_type;
1685 __cache_type* _M_data;
1698 :
facet(__refs), _M_data(0)
1699 { _M_initialize_numpunct(); }
1712 :
facet(__refs), _M_data(__cache)
1713 { _M_initialize_numpunct(); }
1726 :
facet(__refs), _M_data(0)
1727 { _M_initialize_numpunct(__cloc); }
1827 {
return _M_data->_M_decimal_point; }
1839 {
return _M_data->_M_thousands_sep; }
1852 {
return _M_data->_M_grouping; }
1865 {
return _M_data->_M_truename; }
1878 {
return _M_data->_M_falsename; }
1882 _M_initialize_numpunct(__c_locale __cloc = 0);
1885 template<
typename _CharT>
1893 numpunct<char>::_M_initialize_numpunct(__c_locale __cloc);
1895 #ifdef _GLIBCXX_USE_WCHAR_T 1901 numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc);
1905 template<
typename _CharT>
1916 if (__builtin_strcmp(__s,
"C") != 0
1917 && __builtin_strcmp(__s,
"POSIX") != 0)
1920 this->_S_create_c_locale(__tmp, __s);
1921 this->_M_initialize_numpunct(__tmp);
1922 this->_S_destroy_c_locale(__tmp);
1926 #if __cplusplus >= 201103L 1937 _GLIBCXX_END_NAMESPACE_CXX11
1939 _GLIBCXX_BEGIN_NAMESPACE_LDBL
1954 template<
typename _CharT,
typename _InIter>
2003 ios_base::iostate& __err,
bool& __v)
const 2004 {
return this->
do_get(__in, __end, __io, __err, __v); }
2040 ios_base::iostate& __err,
long& __v)
const 2041 {
return this->
do_get(__in, __end, __io, __err, __v); }
2045 ios_base::iostate& __err,
unsigned short& __v)
const 2046 {
return this->
do_get(__in, __end, __io, __err, __v); }
2050 ios_base::iostate& __err,
unsigned int& __v)
const 2051 {
return this->
do_get(__in, __end, __io, __err, __v); }
2055 ios_base::iostate& __err,
unsigned long& __v)
const 2056 {
return this->
do_get(__in, __end, __io, __err, __v); }
2058 #ifdef _GLIBCXX_USE_LONG_LONG 2061 ios_base::iostate& __err,
long long& __v)
const 2062 {
return this->
do_get(__in, __end, __io, __err, __v); }
2066 ios_base::iostate& __err,
unsigned long long& __v)
const 2067 {
return this->
do_get(__in, __end, __io, __err, __v); }
2100 ios_base::iostate& __err,
float& __v)
const 2101 {
return this->
do_get(__in, __end, __io, __err, __v); }
2105 ios_base::iostate& __err,
double& __v)
const 2106 {
return this->
do_get(__in, __end, __io, __err, __v); }
2110 ios_base::iostate& __err,
long double& __v)
const 2111 {
return this->
do_get(__in, __end, __io, __err, __v); }
2143 ios_base::iostate& __err,
void*& __v)
const 2144 {
return this->
do_get(__in, __end, __io, __err, __v); }
2150 _GLIBCXX_DEFAULT_ABI_TAG
2155 template<
typename _ValueT>
2156 _GLIBCXX_DEFAULT_ABI_TAG
2161 template<
typename _CharT2>
2162 typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
int>::__type
2163 _M_find(
const _CharT2*,
size_t __len, _CharT2 __c)
const 2168 if (__c >= _CharT2(
'0') && __c < _CharT2(_CharT2(
'0') + __len))
2169 __ret = __c - _CharT2(
'0');
2173 if (__c >= _CharT2(
'0') && __c <= _CharT2(
'9'))
2174 __ret = __c - _CharT2(
'0');
2175 else if (__c >= _CharT2(
'a') && __c <= _CharT2(
'f'))
2176 __ret = 10 + (__c - _CharT2(
'a'));
2177 else if (__c >= _CharT2(
'A') && __c <= _CharT2(
'F'))
2178 __ret = 10 + (__c - _CharT2(
'A'));
2183 template<
typename _CharT2>
2184 typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
2186 _M_find(
const _CharT2* __zero,
size_t __len, _CharT2 __c)
const 2189 const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c);
2192 __ret = __q - __zero;
2219 ios_base::iostate& __err,
long& __v)
const 2220 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2224 ios_base::iostate& __err,
unsigned short& __v)
const 2225 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2229 ios_base::iostate& __err,
unsigned int& __v)
const 2230 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2234 ios_base::iostate& __err,
unsigned long& __v)
const 2235 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2237 #ifdef _GLIBCXX_USE_LONG_LONG 2240 ios_base::iostate& __err,
long long& __v)
const 2241 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2245 ios_base::iostate& __err,
unsigned long long& __v)
const 2246 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2257 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2268 long double&)
const;
2275 #if defined _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT \ 2276 && defined __LONG_DOUBLE_IEEE128__ 2286 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2291 long double&)
const;
2296 template<
typename _CharT,
typename _InIter>
2312 template<
typename _CharT,
typename _OutIter>
2353 {
return this->
do_put(__s, __io, __fill, __v); }
2395 {
return this->
do_put(__s, __io, __fill, __v); }
2399 unsigned long __v)
const 2400 {
return this->
do_put(__s, __io, __fill, __v); }
2402 #ifdef _GLIBCXX_USE_LONG_LONG 2405 {
return this->
do_put(__s, __io, __fill, __v); }
2409 unsigned long long __v)
const 2410 {
return this->
do_put(__s, __io, __fill, __v); }
2458 {
return this->
do_put(__s, __io, __fill, __v); }
2462 long double __v)
const 2463 {
return this->
do_put(__s, __io, __fill, __v); }
2483 const void* __v)
const 2484 {
return this->
do_put(__s, __io, __fill, __v); }
2487 template<
typename _ValueT>
2490 char __mod, _ValueT __v)
const;
2493 _M_group_float(
const char* __grouping,
size_t __grouping_size,
2497 template<
typename _ValueT>
2503 _M_group_int(
const char* __grouping,
size_t __grouping_size,
2534 {
return _M_insert_int(__s, __io, __fill, __v); }
2538 unsigned long __v)
const 2539 {
return _M_insert_int(__s, __io, __fill, __v); }
2541 #ifdef _GLIBCXX_USE_LONG_LONG 2544 long long __v)
const 2545 {
return _M_insert_int(__s, __io, __fill, __v); }
2549 unsigned long long __v)
const 2550 {
return _M_insert_int(__s, __io, __fill, __v); }
2557 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2569 #if defined _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT \ 2570 && defined __LONG_DOUBLE_IEEE128__ 2576 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2583 template <
typename _CharT,
typename _OutIter>
2586 _GLIBCXX_END_NAMESPACE_LDBL
2594 template<
typename _CharT>
2597 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
2600 template<
typename _CharT>
2603 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
2606 template<
typename _CharT>
2609 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
2612 template<
typename _CharT>
2615 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
2618 template<
typename _CharT>
2621 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
2624 template<
typename _CharT>
2627 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
2630 template<
typename _CharT>
2633 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
2636 template<
typename _CharT>
2639 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
2642 template<
typename _CharT>
2645 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
2648 template<
typename _CharT>
2651 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
2654 template<
typename _CharT>
2657 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
2659 #if __cplusplus >= 201103L 2661 template<
typename _CharT>
2664 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::blank, __c); }
2668 template<
typename _CharT>
2671 {
return use_facet<ctype<_CharT> >(__loc).
toupper(__c); }
2674 template<
typename _CharT>
2677 {
return use_facet<ctype<_CharT> >(__loc).
tolower(__c); }
2679 _GLIBCXX_END_NAMESPACE_VERSION
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
virtual iter_type do_get(iter_type, iter_type, ios_base &, ios_base::iostate &, bool &) const
Numeric parsing.
char_type tolower(char_type __c) const
Convert to lowercase.
_CharT char_type
Typedef for the template parameter.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned long &__v) const
Numeric parsing.
static locale::id id
Numpunct facet id.
class ctype_byname [22.2.1.2].
static locale::id id
The facet id for ctype<char>
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow array to char array.
bool isspace(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::space, __c).
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
Primary class template ctype facet.This template class defines classification and conversion function...
_CharT char_type
Public typedefs.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
char_type widen(char __c) const
Widen char.
char_type toupper(char_type __c) const
Convert to uppercase.
num_get(size_t __refs=0)
Constructor performs initialization.
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
bool isblank(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::blank, __c).
virtual ~num_get()
Destructor.
virtual bool do_is(mask __m, char_type __c) const
Test char_type classification.
Primary class template numpunct.This facet stores several pieces of information related to printing a...
Facet ID class.The ID class provides facets with an index used to identify them. Every facet class mu...
virtual char_type do_toupper(char_type __c) const
Convert to uppercase.
virtual char_type do_tolower(char_type __c) const
Convert to lowercase.
char narrow(char_type __c, char __dfault) const
Narrow char_type to char.
string_type truename() const
Return string representation of bool true.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long double __v) const
Numeric formatting.
virtual const char_type * do_scan_is(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type matching mask.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, bool __v) const
Numeric formatting.
basic_string< _CharT > string_type
Public typedefs.
string_type falsename() const
Return string representation of bool false.
The base of the I/O class hierarchy.This class defines everything that can be defined about I/O that ...
_OutIter iter_type
Public typedefs.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned short &__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 thousands_sep() const
Return thousands separator character.
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.
Localization functionality base class.The facet class is the base class for a localization feature...
bool isalnum(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alnum, __c).
virtual char_type do_tolower(char_type __c) const =0
Convert to lowercase.
bool isupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::upper, __c).
numpunct(size_t __refs=0)
Numpunct constructor.
bool islower(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::lower, __c).
Common base for ctype facet.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
const char_type * scan_not(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type not matching a mask.
virtual const char * do_widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
string grouping() const
Return grouping specification.
const mask * table() const
Returns a pointer to the mask table provided to the constructor, or the default from classic_table() ...
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
virtual const char_type * do_scan_is(mask __m, const char_type *__lo, const char_type *__hi) const =0
Find char_type matching mask.
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen array to char_type.
char_type toupper(char_type __c) const
Convert to uppercase.
_Ios_Iostate iostate
This is a bitmask type.
char narrow(char_type __c, char __dfault) const
Narrow char.
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow char array.
_CharT char_type
Public typedefs.
virtual const char_type * do_scan_not(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type not matching mask.
facet(size_t __refs=0)
Facet constructor.
bool isxdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::xdigit, __c).
virtual char_type do_decimal_point() const
Return decimal point character.
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
bool isdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::digit, __c).
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
bool ispunct(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::punct, __c).
virtual char_type do_toupper(char_type __c) const =0
Convert to uppercase.
virtual string do_grouping() const
Return grouping specification.
const char_type * scan_is(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type matching a mask.
static locale::id id
Numpunct facet id.
num_put(size_t __refs=0)
Constructor performs initialization.
class numpunct_byname [22.2.3.2].
virtual char do_narrow(char_type __c, char __dfault) const
Narrow char.
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, bool __v) const
Numeric formatting.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, double __v) const
Numeric formatting.
char_type widen(char __c) const
Widen char to char_type.
bool isgraph(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::graph, __c).
char_type tolower(char_type __c) const
Convert to lowercase.
bool is(mask __m, char_type __c) const
Test char_type classification.
virtual string_type do_falsename() const
Return string representation of bool false.
_CharT char_type
Public typedefs.
Primary class template num_put.This facet encapsulates the code to convert a number to a string...
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
char char_type
Typedef for the template parameter char.
virtual char_type do_widen(char __c) const =0
Widen char.
virtual char do_narrow(char_type, char __dfault) const
Narrow char_type to char.
char_type decimal_point() const
Return decimal point character.
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.
virtual const char_type * do_scan_not(mask __m, const char_type *__lo, const char_type *__hi) const =0
Find char_type not matching mask.
bool isalpha(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alpha, __c).
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, long &__v) const
Numeric parsing.
_InIter iter_type
Public typedefs.
bool iscntrl(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::cntrl, __c).
static locale::id id
The facet id for ctype<wchar_t>
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned int &__v) const
Numeric parsing.
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
numpunct(__c_locale __cloc, size_t __refs=0)
Internal constructor. Not for general use.
_CharT toupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.toupper(__c).
wchar_t char_type
Typedef for the template parameter wchar_t.
virtual ~num_put()
Destructor.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
virtual char do_narrow(char_type __c, char __dfault) const =0
Narrow char_type to char.
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
_CharT tolower(_CharT __c, const locale &__loc)
Convenience interface to ctype.tolower(__c).
Container class for localization functionality.The locale class is first a class wrapper for C librar...
virtual string_type do_truename() const
Return string representation of bool true.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
virtual char_type do_widen(char __c) const
Widen char.
static locale::id id
Numpunct facet id.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, long long &__v) const
Numeric parsing.
ISO C++ entities toplevel namespace is std.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, const void *__v) const
Numeric formatting.
virtual ~numpunct()
Destructor.
virtual char_type do_thousands_sep() const
Return thousands separator character.
virtual bool do_is(mask __m, char_type __c) const =0
Test char_type classification.
numpunct(__cache_type *__cache, size_t __refs=0)
Internal constructor. Not for general use.
bool isprint(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::print, __c).
const char_type * is(const char_type *__lo, const char_type *__hi, mask *__vec) const
Return a mask array.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
static locale::id id
The facet id for ctype<char_type>