Hi

I just want to make sure that you agree that I can remove the @todo by implementing operator-> this way.

    * include/debug/safe_iterator.h
    (_Safe_iterator<>::operator->()): Implement using underlying iterator
    operator ->.
    * include/debug/safe_local_iterator.h
    (_Safe_local_iterator<>::operator->()): Likewise.

François
diff --git a/libstdc++-v3/include/debug/safe_iterator.h b/libstdc++-v3/include/debug/safe_iterator.h
index 5368f3b..03c0263 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 4fcc05e..70e14697 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 ------

Reply via email to