32 #ifndef _POD_CHAR_TRAITS_H
33 #define _POD_CHAR_TRAITS_H 1
35 #pragma GCC system_header
39 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
41 _GLIBCXX_BEGIN_NAMESPACE_VERSION
48 template<
typename _Value,
typename _Int,
typename _St = std::mbstate_t>
51 typedef _Value value_type;
52 typedef _Int int_type;
53 typedef _St state_type;
62 char_type ret = {
static_cast<value_type
>(v) };
70 V2 ret = {
static_cast<V2
>(c.value) };
76 template<
typename _Value,
typename _Int,
typename _St>
80 {
return lhs.value == rhs.value; }
82 template<
typename _Value,
typename _Int,
typename _St>
84 operator<(const character<_Value, _Int, _St>& lhs,
86 {
return lhs.value < rhs.value; }
88 _GLIBCXX_END_NAMESPACE_VERSION
91 namespace std _GLIBCXX_VISIBILITY(default)
93 _GLIBCXX_BEGIN_NAMESPACE_VERSION
96 template<
typename _Value,
typename _Int,
typename _St>
100 typedef typename char_type::int_type int_type;
101 typedef typename char_type::state_type state_type;
111 {
return __c1 == __c2; }
115 {
return __c1 < __c2; }
120 for (
size_t __i = 0; __i < __n; ++__i)
121 if (!eq(__s1[__i], __s2[__i]))
122 return lt(__s1[__i], __s2[__i]) ? -1 : 1;
138 for (
const char_type* __p = __s; size_t(__p - __s) < __n; ++__p)
148 (__builtin_memmove(__s1, __s2, __n *
sizeof(
char_type)));
154 std::copy(__s2, __s2 + __n, __s1);
166 to_char_type(
const int_type& __i)
167 {
return char_type::template from(__i); }
171 {
return char_type::template to<int_type>(__c); }
174 eq_int_type(
const int_type& __c1,
const int_type& __c2)
175 {
return __c1 == __c2; }
180 int_type __r = { -1 };
185 not_eof(
const int_type& __c)
186 {
return eq_int_type(__c, eof()) ? int_type() : __c; }
189 _GLIBCXX_END_NAMESPACE_VERSION
Class representing stream positions.
A POD class that serves as a character abstraction class.
long long streamoff
Type used by fpos, char_traits<char>, and char_traits<wchar_t>.
Basis for explicit traits specializations.
_OI fill_n(_OI __first, _Size __n, const _Tp &__value)
Fills the range [first,first+n) with copies of value.