forward_list debug swap
François Dumont
francois.cppdevs@free.fr
Mon Jan 3 20:25:00 GMT 2011
Hi
I still don't feel comfortable with current implementation of debug
foward_list swap regarding management of before_begin iterators. I know
that you are supposed to talk about it Paolo with LWG guys on next
meeting but waiting for it I would prefer to apply a patch so that
normal and debug mode are behaving consistently.
This is why I would like to propose the attached patch which is a
revisited shorter version of the one I submitted some weeks ago. You
will see that thanks to this patch I have been able to remove the ugly
#if !_GLIBCXX_DEBUG in the swap.cc test case.
2011-01-04 François Dumont <xxxx@free.fr>
* include/debug/safe_base.h (_Safe_iterator_base::_M_unlink): New.
* include/src/debug.cc: Use latter
* include/debug/forward_list (forward_list<>::_M_swap): Fix to
correctly
handle before_begin iterators.
Regards
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: forward_list_debug_swap.patch
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20110103/0d170118/attachment.ksh>
More information about the Libstdc++
mailing list