This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Debug iterator cleanup
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 23 May 2016 12:29:19 +0100
- Subject: Re: Debug iterator cleanup
- Authentication-results: sourceware.org; auth=none
- References: <5741CE78 dot 1040705 at gmail dot com>
On 22/05/16 17:21 +0200, François Dumont wrote:
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.
We never use _Safe_iterator to wrap a raw pointer, right? Raw pointers
don't have operator-> so that wouldn't work, but I think we only wrap
class types (the containers that might use raw pointers use
__normal_iterator instead).
So it looks good to me, thanks.