2016-05-23 François Dumont <fdumont@gcc.gnu.org>
authorFrançois Dumont <fdumont@gcc.gnu.org>
Mon, 23 May 2016 20:03:35 +0000 (20:03 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Mon, 23 May 2016 20:03:35 +0000 (20:03 +0000)
* 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
libstdc++-v3/include/debug/safe_iterator.h
libstdc++-v3/include/debug/safe_local_iterator.h

index 21e51c023b65e83733d2d529b7f00481010c4e85..30a1cc4356f7f2617dc54ff14de7d455bef20374 100644 (file)
@@ -1,3 +1,11 @@
+2016-05-23  François Dumont  <fdumont@gcc.gnu.org>
+
+       * 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  <thomas.preudhomme@arm.com>
 
        * testsuite/experimental/memory_resource/1.cc: Add required argument
index 5368f3b9a2d3af4d675e1044ff416fe2f822b11b..03c02638a13593ea09fadeffbb57c77003f16659 100644 (file)
@@ -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 ------
index 4fcc05e4c738f4b904ced16e694734914653dbb8..70e14697f178d506ea04c9307666d341fc97e55a 100644 (file)
@@ -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 ------