diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2014-02-27 02:11:50 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2014-02-27 02:11:50 +0000 |
| commit | c204c130fabdffa131d487ec1c701fc95dba0ffe (patch) | |
| tree | 774cebe869dd800f36c68ada7a0d74bc1c1265c4 /libcxx/include/iterator | |
| parent | 27a58bf7705a8735415425bcf7476f223f210a09 (diff) | |
| download | bcm5719-llvm-c204c130fabdffa131d487ec1c701fc95dba0ffe.tar.gz bcm5719-llvm-c204c130fabdffa131d487ec1c701fc95dba0ffe.zip | |
LWG issue #2188: Reverse iterator does not fully support targets that overload operator&. Also mark #2272 and #2299 as complete; libc++ already implements them.
llvm-svn: 202339
Diffstat (limited to 'libcxx/include/iterator')
| -rw-r--r-- | libcxx/include/iterator | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/include/iterator b/libcxx/include/iterator index 28a946cb936..b1bcdfc10b0 100644 --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -327,6 +327,7 @@ template <class C> auto crend(const C& c) -> decltype(std::rend(c)); // */ #include <__config> +#include <__functional_base> #include <type_traits> #include <cstddef> #include <iosfwd> @@ -549,7 +550,7 @@ public: : __t(__u.base()), current(__u.base()) {} _LIBCPP_INLINE_VISIBILITY _Iter base() const {return current;} _LIBCPP_INLINE_VISIBILITY reference operator*() const {__t = current; return *--__t;} - _LIBCPP_INLINE_VISIBILITY pointer operator->() const {return &(operator*());} + _LIBCPP_INLINE_VISIBILITY pointer operator->() const {return _VSTD::addressof(operator*());} _LIBCPP_INLINE_VISIBILITY reverse_iterator& operator++() {--current; return *this;} _LIBCPP_INLINE_VISIBILITY reverse_iterator operator++(int) {reverse_iterator __tmp(*this); --current; return __tmp;} |

