LWG issue #2188: Reverse iterator does not fully support targets that overload operator&. Also mark #2272 and #2299 as complete; libc++ already implements them.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202339 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/iterator b/include/iterator
index 28a946c..b1bcdfc 100644
--- a/include/iterator
+++ b/include/iterator
@@ -327,6 +327,7 @@
*/
#include <__config>
+#include <__functional_base>
#include <type_traits>
#include <cstddef>
#include <iosfwd>
@@ -549,7 +550,7 @@
: __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;}