[cfe-commits] [libcxx] r126576 - in /libcxx/trunk/include: __hash_table istream map
Howard Hinnant
hhinnant at apple.com
Sun Feb 27 10:02:02 PST 2011
Author: hhinnant
Date: Sun Feb 27 12:02:02 2011
New Revision: 126576
URL: http://llvm.org/viewvc/llvm-project?rev=126576&view=rev
Log:
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.
Modified:
libcxx/trunk/include/__hash_table
libcxx/trunk/include/istream
libcxx/trunk/include/map
Modified: libcxx/trunk/include/__hash_table
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__hash_table?rev=126576&r1=126575&r2=126576&view=diff
==============================================================================
--- libcxx/trunk/include/__hash_table (original)
+++ libcxx/trunk/include/__hash_table Sun Feb 27 12:02:02 2011
@@ -29,9 +29,9 @@
struct __hash_node_base
{
typedef __hash_node_base __first_node;
- typedef _NodePtr pointer;
+ // typedef _NodePtr pointer;
- pointer __next_;
+ _NodePtr __next_;
_LIBCPP_INLINE_VISIBILITY __hash_node_base() : __next_(nullptr) {}
};
Modified: libcxx/trunk/include/istream
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/istream?rev=126576&r1=126575&r2=126576&view=diff
==============================================================================
--- libcxx/trunk/include/istream (original)
+++ libcxx/trunk/include/istream Sun Feb 27 12:02:02 2011
@@ -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
}
Modified: libcxx/trunk/include/map
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/map?rev=126576&r1=126575&r2=126576&view=diff
==============================================================================
--- libcxx/trunk/include/map (original)
+++ libcxx/trunk/include/map Sun Feb 27 12:02:02 2011
@@ -493,11 +493,11 @@
_TreeIterator __i_;
typedef typename _TreeIterator::__pointer_traits __pointer_traits;
- typedef const typename _TreeIterator::value_type::first_type key_type;
- typedef typename _TreeIterator::value_type::second_type mapped_type;
+ typedef const typename _TreeIterator::value_type::first_type __key_type;
+ typedef typename _TreeIterator::value_type::second_type __mapped_type;
public:
typedef bidirectional_iterator_tag iterator_category;
- typedef pair<key_type, mapped_type> value_type;
+ typedef pair<__key_type, __mapped_type> value_type;
typedef typename _TreeIterator::difference_type difference_type;
typedef value_type& reference;
typedef typename __pointer_traits::template
@@ -558,11 +558,11 @@
_TreeIterator __i_;
typedef typename _TreeIterator::__pointer_traits __pointer_traits;
- typedef const typename _TreeIterator::value_type::first_type key_type;
- typedef typename _TreeIterator::value_type::second_type mapped_type;
+ typedef const typename _TreeIterator::value_type::first_type __key_type;
+ typedef typename _TreeIterator::value_type::second_type __mapped_type;
public:
typedef bidirectional_iterator_tag iterator_category;
- typedef pair<key_type, mapped_type> value_type;
+ typedef pair<__key_type, __mapped_type> value_type;
typedef typename _TreeIterator::difference_type difference_type;
typedef const value_type& reference;
typedef typename __pointer_traits::template
More information about the cfe-commits
mailing list