32 #ifndef _POD_CHAR_TRAITS_H
33 #define _POD_CHAR_TRAITS_H 1
37 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
39 _GLIBCXX_BEGIN_NAMESPACE_VERSION
46 template<
typename V,
typename I,
typename S = std::mbstate_t>
60 char_type ret = {
static_cast<value_type
>(v) };
68 V2 ret = {
static_cast<V2
>(c.value) };
74 template<
typename V,
typename I,
typename S>
77 {
return lhs.value == rhs.value; }
79 template<
typename V,
typename I,
typename S>
82 {
return lhs.value < rhs.value; }
84 _GLIBCXX_END_NAMESPACE_VERSION
87 namespace std _GLIBCXX_VISIBILITY(default)
89 _GLIBCXX_BEGIN_NAMESPACE_VERSION
92 template<
typename V,
typename I,
typename S>
96 typedef typename char_type::int_type int_type;
97 typedef typename char_type::state_type state_type;
107 {
return __c1 == __c2; }
111 {
return __c1 < __c2; }
116 for (
size_t __i = 0; __i < __n; ++__i)
117 if (!eq(__s1[__i], __s2[__i]))
118 return lt(__s1[__i], __s2[__i]) ? -1 : 1;
134 for (
const char_type* __p = __s; size_t(__p - __s) < __n; ++__p)
144 (__builtin_memmove(__s1, __s2, __n *
sizeof(
char_type)));
150 std::copy(__s2, __s2 + __n, __s1);
162 to_char_type(
const int_type& __i)
163 {
return char_type::template from(__i); }
167 {
return char_type::template to<int_type>(__c); }
170 eq_int_type(
const int_type& __c1,
const int_type& __c2)
171 {
return __c1 == __c2; }
176 int_type __r = { -1 };
181 not_eof(
const int_type& __c)
182 {
return eq_int_type(__c, eof()) ? int_type() : __c; }
185 _GLIBCXX_END_NAMESPACE_VERSION
Basis for explicit traits specializations.
long long streamoff
Type used by fpos, char_traits<char>, and char_traits<wchar_t>.
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.