[libcxx] r203631 - THIRD TIME. Richard pointed out (again) that I'd switched the order of the instance variables; and thus failed to repair the ABI break. After this, I'm going to sit down and watch TV for the evening.

Marshall Clow mclow.lists at gmail.com
Tue Mar 11 18:19:36 PDT 2014


Author: marshall
Date: Tue Mar 11 20:19:36 2014
New Revision: 203631

URL: http://llvm.org/viewvc/llvm-project?rev=203631&view=rev
Log:
THIRD TIME. Richard pointed out (again) that I'd switched the order of the instance variables; and thus failed to repair the ABI break. After this, I'm going to sit down and watch TV for the evening.

Modified:
    libcxx/trunk/include/iterator

Modified: libcxx/trunk/include/iterator
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/iterator?rev=203631&r1=203630&r2=203631&view=diff
==============================================================================
--- libcxx/trunk/include/iterator (original)
+++ libcxx/trunk/include/iterator Tue Mar 11 20:19:36 2014
@@ -536,20 +536,20 @@ class _LIBCPP_TYPE_VIS_ONLY reverse_iter
                       typename iterator_traits<_Iter>::pointer,
                       typename iterator_traits<_Iter>::reference>
 {
-protected:
-    _Iter current;
 private:
     mutable _Iter __t;  // no longer used as of LWG #2360, not removed due to ABI break
+protected:
+    _Iter current;
 public:
     typedef _Iter                                            iterator_type;
     typedef typename iterator_traits<_Iter>::difference_type difference_type;
     typedef typename iterator_traits<_Iter>::reference       reference;
     typedef typename iterator_traits<_Iter>::pointer         pointer;
 
-    _LIBCPP_INLINE_VISIBILITY reverse_iterator() : current(), __t() {}
-    _LIBCPP_INLINE_VISIBILITY explicit reverse_iterator(_Iter __x) : current(__x), __t() {}
+    _LIBCPP_INLINE_VISIBILITY reverse_iterator() : current() {}
+    _LIBCPP_INLINE_VISIBILITY explicit reverse_iterator(_Iter __x) : __t(__x), current(__x) {}
     template <class _Up> _LIBCPP_INLINE_VISIBILITY reverse_iterator(const reverse_iterator<_Up>& __u)
-        : current(__u.base()), __t() {}
+        : __t(__u.base()), current(__u.base()) {}
     _LIBCPP_INLINE_VISIBILITY _Iter base() const {return current;}
     _LIBCPP_INLINE_VISIBILITY reference operator*() const {_Iter __tmp = current; return *--__tmp;}
     _LIBCPP_INLINE_VISIBILITY pointer  operator->() const {return _VSTD::addressof(operator*());}





More information about the cfe-commits mailing list