From 447caf82a46a3f14ef475897791d11051f2f100c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Dumont?= Date: Mon, 23 May 2016 20:03:35 +0000 Subject: [PATCH] =?utf8?q?2016-05-23=20=20Fran=C3=A7ois=20Dumont=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * include/debug/safe_iterator.h (_Safe_iterator<>::operator->()): Implement using underlying iterator operator ->. * include/debug/safe_local_iterator.h (_Safe_local_iterator<>::operator->()): Likewise. From-SVN: r236611 --- libstdc++-v3/ChangeLog | 8 ++++++++ libstdc++-v3/include/debug/safe_iterator.h | 3 +-- libstdc++-v3/include/debug/safe_local_iterator.h | 3 +-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 21e51c023b6..30a1cc4356f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2016-05-23 François Dumont + + * include/debug/safe_iterator.h + (_Safe_iterator<>::operator->()): Implement using underlying iterator + operator ->. + * include/debug/safe_local_iterator.h + (_Safe_local_iterator<>::operator->()): Likewise. + 2016-05-20 Thomas Preud'homme * testsuite/experimental/memory_resource/1.cc: Add required argument diff --git a/libstdc++-v3/include/debug/safe_iterator.h b/libstdc++-v3/include/debug/safe_iterator.h index 5368f3b9a2d..03c02638a13 100644 --- a/libstdc++-v3/include/debug/safe_iterator.h +++ b/libstdc++-v3/include/debug/safe_iterator.h @@ -274,7 +274,6 @@ namespace __gnu_debug /** * @brief Iterator dereference. * @pre iterator is dereferenceable - * @todo Make this correct w.r.t. iterators that return proxies */ pointer operator->() const _GLIBCXX_NOEXCEPT @@ -282,7 +281,7 @@ namespace __gnu_debug _GLIBCXX_DEBUG_VERIFY(this->_M_dereferenceable(), _M_message(__msg_bad_deref) ._M_iterator(*this, "this")); - return std::__addressof(*base()); + return base().operator->(); } // ------ Input iterator requirements ------ diff --git a/libstdc++-v3/include/debug/safe_local_iterator.h b/libstdc++-v3/include/debug/safe_local_iterator.h index 4fcc05e4c73..70e14697f17 100644 --- a/libstdc++-v3/include/debug/safe_local_iterator.h +++ b/libstdc++-v3/include/debug/safe_local_iterator.h @@ -236,7 +236,6 @@ namespace __gnu_debug /** * @brief Iterator dereference. * @pre iterator is dereferenceable - * @todo Make this correct w.r.t. iterators that return proxies */ pointer operator->() const @@ -244,7 +243,7 @@ namespace __gnu_debug _GLIBCXX_DEBUG_VERIFY(this->_M_dereferenceable(), _M_message(__msg_bad_deref) ._M_iterator(*this, "this")); - return std::__addressof(*base()); + return base().operator->(); } // ------ Input iterator requirements ------ -- 2.30.2