33 #ifndef _POD_CHAR_TRAITS_H
34 #define _POD_CHAR_TRAITS_H 1
36 #pragma GCC system_header
40 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
42 _GLIBCXX_BEGIN_NAMESPACE_VERSION
49 template<
typename V,
typename I,
typename S = std::mbstate_t>
63 char_type ret = {
static_cast<value_type
>(v) };
71 V2 ret = {
static_cast<V2
>(c.value) };
77 template<
typename V,
typename I,
typename S>
80 {
return lhs.value == rhs.value; }
82 template<
typename V,
typename I,
typename S>
85 {
return lhs.value < rhs.value; }
87 _GLIBCXX_END_NAMESPACE_VERSION
90 namespace std _GLIBCXX_VISIBILITY(default)
92 _GLIBCXX_BEGIN_NAMESPACE_VERSION
95 template<
typename V,
typename I,
typename S>
99 typedef typename char_type::int_type int_type;
100 typedef typename char_type::state_type state_type;
110 {
return __c1 == __c2; }
114 {
return __c1 < __c2; }
119 for (
size_t __i = 0; __i < __n; ++__i)
120 if (!eq(__s1[__i], __s2[__i]))
121 return lt(__s1[__i], __s2[__i]) ? -1 : 1;
137 for (
const char_type* __p = __s; size_t(__p - __s) < __n; ++__p)
147 (__builtin_memmove(__s1, __s2, __n *
sizeof(
char_type)));
153 std::copy(__s2, __s2 + __n, __s1);
165 to_char_type(
const int_type& __i)
166 {
return char_type::template from(__i); }
170 {
return char_type::template to<int_type>(__c); }
173 eq_int_type(
const int_type& __c1,
const int_type& __c2)
174 {
return __c1 == __c2; }
179 int_type __r = { -1 };
184 not_eof(
const int_type& __c)
185 {
return eq_int_type(__c, eof()) ? int_type() : __c; }
188 _GLIBCXX_END_NAMESPACE_VERSION
Class representing stream positions.
_OI fill_n(_OI __first, _Size __n, const _Tp &__value)
Fills the range [first,first+n) with copies of value.
A POD class that serves as a character abstraction class.
Basis for explicit traits specializations.
long long streamoff
Type used by fpos, char_traits<char>, and char_traits<wchar_t>.