Commit 7fa4d423 authored by Arthur O'Dwyer's avatar Arthur O'Dwyer

Fix char_traits<unsigned char> to what looks like correct behavior.

char_traits<unsigned char>::to_char_type(x) used to return 0 no matter
what x was, and likewise to_int_type(x) used to return 0 no matter what.
(0 is what you get when you default-construct an integral type, which
is what the old code was doing.) This seemed like buggy behavior to me,
so I've changed it.
parent f6fe600e
......@@ -96,10 +96,10 @@ namespace std
static char_type
to_char_type(const int_type& __c)
{ return char_type(); }
{ return char_type(__c); }
static int_type
to_int_type(const char_type& __c) { return int_type(); }
to_int_type(const char_type& __c) { return int_type(__c); }
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment