86 operator<(
const character<_Value, _Int, _St>& lhs,
102 typedef typename char_type::int_type int_type;
103 typedef typename char_type::state_type state_type;
108 assign(char_type& __c1,
const char_type& __c2)
112 eq(
const char_type& __c1,
const char_type& __c2)
113 {
return __c1 == __c2; }
116 lt(
const char_type& __c1,
const char_type& __c2)
117 {
return __c1 < __c2; }
120 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
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;
129 length(
const char_type* __s)
131 const char_type* __p = __s;
137 static const char_type*
138 find(
const char_type* __s,
size_t __n,
const char_type& __a)
140 for (
const char_type* __p = __s; size_t(__p - __s) < __n; ++__p)
147 move(char_type* __s1,
const char_type* __s2,
size_t __n)
151 return static_cast<char_type*
>
152 (__builtin_memmove(__s1, __s2, __n *
sizeof(char_type)));
156 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
160 std::copy(__s2, __s2 + __n, __s1);
165 assign(char_type* __s,
size_t __n, char_type __a)
167 std::fill_n(__s, __n, __a);
172 to_char_type(
const int_type& __i)
173 {
return char_type::template from(__i); }
176 to_int_type(
const char_type& __c)
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; }