32#ifndef _POD_CHAR_TRAITS_H
33#define _POD_CHAR_TRAITS_H 1
35#pragma GCC system_header
41namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
43_GLIBCXX_BEGIN_NAMESPACE_VERSION
50 template<
typename _Value,
typename _Int,
typename _St = std::mbstate_t>
53 typedef _Value value_type;
54 typedef _Int int_type;
55 typedef _St state_type;
64 char_type ret = {
static_cast<value_type
>(v) };
72 V2 ret = {
static_cast<V2
>(c.value) };
78 template<
typename _Value,
typename _Int,
typename _St>
82 {
return lhs.value == rhs.value; }
84 template<
typename _Value,
typename _Int,
typename _St>
86 operator<(
const character<_Value, _Int, _St>& lhs,
87 const character<_Value, _Int, _St>& rhs)
88 {
return lhs.value < rhs.value; }
90_GLIBCXX_END_NAMESPACE_VERSION
93namespace std _GLIBCXX_VISIBILITY(default)
95_GLIBCXX_BEGIN_NAMESPACE_VERSION
98 template<
typename _Value,
typename _Int,
typename _St>
102 typedef typename char_type::int_type int_type;
103 typedef typename char_type::state_type state_type;
113 {
return __c1 == __c2; }
117 {
return __c1 < __c2; }
122 for (
size_t __i = 0; __i < __n; ++__i)
123 if (!eq(__s1[__i], __s2[__i]))
124 return lt(__s1[__i], __s2[__i]) ? -1 : 1;
140 for (
const char_type* __p = __s; size_t(__p - __s) < __n; ++__p)
152 (__builtin_memmove(__s1, __s2, __n *
sizeof(
char_type)));
160 std::copy(__s2, __s2 + __n, __s1);
167 std::fill_n(__s, __n, __a);
172 to_char_type(
const int_type& __i)
173 {
return char_type::template from(__i); }
177 {
return char_type::template to<int_type>(__c); }
180 eq_int_type(
const int_type& __c1,
const int_type& __c2)
181 {
return __c1 == __c2; }
186 int_type __r = {
static_cast<typename __gnu_cxx::__conditional_type
187 <std::__is_integer<int_type>::__value,
188 int_type,
int>::__type>(-1) };
193 not_eof(
const int_type& __c)
194 {
return eq_int_type(__c, eof()) ? int_type() : __c; }
197_GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
long long streamoff
Type used by fpos, char_traits<char>, and char_traits<wchar_t>.
GNU extensions for public use.
Basis for explicit traits specializations.
Class representing stream positions.
A POD class that serves as a character abstraction class.