* include/bits/char_traits.h (char_traits<char16_t>::
assign(char_type*, size_t, char_type), char_traits<char32_t>::
assign(char_type*, size_t, char_type)): For now, just open-code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139367
138bc75d-0d04-0410-961f-
82ee72b054a4
2008-08-20 Paolo Carlini <paolo.carlini@oracle.com>
2008-08-20 Paolo Carlini <paolo.carlini@oracle.com>
+ * include/bits/char_traits.h (char_traits<char16_t>::
+ assign(char_type*, size_t, char_type), char_traits<char32_t>::
+ assign(char_type*, size_t, char_type)): For now, just open-code.
+
+2008-08-20 Paolo Carlini <paolo.carlini@oracle.com>
+
PR c++/33979 (partial)
* include/bits/postypes.h (u16streampos, u32streampos): Add.
* include/bits/char_traits.h (char_traits<char16_t>,
PR c++/33979 (partial)
* include/bits/postypes.h (u16streampos, u32streampos): Add.
* include/bits/char_traits.h (char_traits<char16_t>,
{ return __c1 == __c2; }
static int_type
{ return __c1 == __c2; }
static int_type
- eof() { return static_cast<int_type>(_CHAR_TRAITS_EOF); }
+ eof()
+ { return static_cast<int_type>(_CHAR_TRAITS_EOF); }
static int_type
not_eof(const int_type& __c)
static int_type
not_eof(const int_type& __c)
{ return wmemset(__s, __a, __n); }
static char_type
{ return wmemset(__s, __a, __n); }
static char_type
- to_char_type(const int_type& __c) { return char_type(__c); }
+ to_char_type(const int_type& __c)
+ { return char_type(__c); }
- to_int_type(const char_type& __c) { return int_type(__c); }
+ to_int_type(const char_type& __c)
+ { return int_type(__c); }
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
static int_type
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
static int_type
- eof() { return static_cast<int_type>(WEOF); }
+ eof()
+ { return static_cast<int_type>(WEOF); }
static int_type
not_eof(const int_type& __c)
static int_type
not_eof(const int_type& __c)
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
- {
- std::fill_n(__s, __n, __a);
+ {
+ for (size_t __i = 0; __i < __n; ++__i)
+ assign(__s[__i], __a);
return __s;
}
static char_type
return __s;
}
static char_type
- to_char_type(const int_type& __c) { return char_type(__c); }
+ to_char_type(const int_type& __c)
+ { return char_type(__c); }
- to_int_type(const char_type& __c) { return int_type(__c); }
+ to_int_type(const char_type& __c)
+ { return int_type(__c); }
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
static int_type
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
static int_type
- eof() { return static_cast<int_type>(-1); }
+ eof()
+ { return static_cast<int_type>(-1); }
static int_type
not_eof(const int_type& __c)
static int_type
not_eof(const int_type& __c)
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{
- std::fill_n(__s, __n, __a);
+ for (size_t __i = 0; __i < __n; ++__i)
+ assign(__s[__i], __a);
return __s;
}
static char_type
return __s;
}
static char_type
- to_char_type(const int_type& __c) { return char_type(__c); }
+ to_char_type(const int_type& __c)
+ { return char_type(__c); }
- to_int_type(const char_type& __c) { return int_type(__c); }
+ to_int_type(const char_type& __c)
+ { return int_type(__c); }
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
static int_type
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
static int_type
- eof() { return static_cast<int_type>(-1); }
+ eof()
+ { return static_cast<int_type>(-1); }
static int_type
not_eof(const int_type& __c)
static int_type
not_eof(const int_type& __c)