[libcxx] r203610 - Fix ABI break I made in r203587; thanks to Richard Smith for the catch.
Richard Smith
richard at metafoo.co.uk
Tue Mar 11 16:02:06 PDT 2014
On Tue, Mar 11, 2014 at 3:05 PM, Marshall Clow <mclow.lists at gmail.com>wrote:
> Author: marshall
> Date: Tue Mar 11 17:05:31 2014
> New Revision: 203610
>
> URL: http://llvm.org/viewvc/llvm-project?rev=203610&view=rev
> Log:
> Fix ABI break I made in r203587; thanks to Richard Smith for the catch.
>
> Modified:
> libcxx/trunk/include/iterator
>
> Modified: libcxx/trunk/include/iterator
> URL:
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/iterator?rev=203610&r1=203609&r2=203610&view=diff
>
> ==============================================================================
> --- libcxx/trunk/include/iterator (original)
> +++ libcxx/trunk/include/iterator Tue Mar 11 17:05:31 2014
> @@ -538,16 +538,18 @@ class _LIBCPP_TYPE_VIS_ONLY reverse_iter
> {
> protected:
> _Iter current;
> +private:
> + mutable _Iter __t; // no longer used as of LWG #2360, not removed
> due to ABI break
>
For this to be ABI-compatible with the old iterator, you'll need to keep
these two variables the other way around.
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() {}
> - _LIBCPP_INLINE_VISIBILITY explicit reverse_iterator(_Iter __x) :
> current(__x) {}
> + _LIBCPP_INLINE_VISIBILITY reverse_iterator() : current(), __t() {}
> + _LIBCPP_INLINE_VISIBILITY explicit reverse_iterator(_Iter __x) :
> current(__x), __t() {}
> template <class _Up> _LIBCPP_INLINE_VISIBILITY reverse_iterator(const
> reverse_iterator<_Up>& __u)
> - : current(__u.base()) {}
> + : current(__u.base()), __t() {}
> _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*());}
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140311/d3b4629b/attachment.html>
More information about the cfe-commits
mailing list