88 operator<(
const character<_Value, _Int, _St>& lhs,
104 typedef typename char_type::int_type int_type;
105 typedef typename char_type::state_type state_type;
110 assign(char_type& __c1,
const char_type& __c2)
114 eq(
const char_type& __c1,
const char_type& __c2)
115 {
return __c1 == __c2; }
118 lt(
const char_type& __c1,
const char_type& __c2)
119 {
return __c1 < __c2; }
122 compare(
const char_type* __s1,
const char_type* __s2,
size_t __n)
124 for (
size_t __i = 0; __i < __n; ++__i)
125 if (!eq(__s1[__i], __s2[__i]))
126 return lt(__s1[__i], __s2[__i]) ? -1 : 1;
131 length(
const char_type* __s)
133 const char_type* __p = __s;
139 static const char_type*
140 find(
const char_type* __s,
size_t __n,
const char_type& __a)
142 for (
const char_type* __p = __s; size_t(__p - __s) < __n; ++__p)
149 move(char_type* __s1,
const char_type* __s2,
size_t __n)
153 return static_cast<char_type*
>
154 (__builtin_memmove(__s1, __s2, __n *
sizeof(char_type)));
158 copy(char_type* __s1,
const char_type* __s2,
size_t __n)
162 std::copy(__s2, __s2 + __n, __s1);
167 assign(char_type* __s,
size_t __n, char_type __a)
169 std::fill_n(__s, __n, __a);
174 to_char_type(
const int_type& __i)
175 {
return char_type::template from(__i); }
178 to_int_type(
const char_type& __c)
179 {
return char_type::template to<int_type>(__c); }
182 eq_int_type(
const int_type& __c1,
const int_type& __c2)
183 {
return __c1 == __c2; }
188 int_type __r = {
static_cast<typename __gnu_cxx::__conditional_type
189 <std::__is_integer<int_type>::__value,
190 int_type,
int>::__type>(-1) };
195 not_eof(
const int_type& __c)
196 {
return eq_int_type(__c, eof()) ? int_type() : __c; }