Fixed two problems found by Chris Jefferson: Made operator>> for char consistent with gcc. Opened an LWG issue on this one. 2) Renamed some private typedefs which are causing boost grief.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@126576 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/istream b/include/istream
index 90bf4b6..b427605 100644
--- a/include/istream
+++ b/include/istream
@@ -801,6 +801,13 @@
typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
if (__sen)
{
+#if 1
+ typename _Traits::int_type __i = __is.rdbuf()->sbumpc();
+ if (_Traits::eq_int_type(__i, _Traits::eof()))
+ __is.setstate(ios_base::eofbit | ios_base::failbit);
+ else
+ __c = _Traits::to_char_type(__i);
+#else
typedef istreambuf_iterator<_CharT, _Traits> _I;
_I __i(__is);
_I __eof;
@@ -812,6 +819,7 @@
}
else
__is.setstate(ios_base::eofbit | ios_base::failbit);
+#endif
}
#ifndef _LIBCPP_NO_EXCEPTIONS
}