summaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
authorfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-05 20:52:36 +0000
committerfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-05 20:52:36 +0000
commit9de27403457ffe6d85783946fefd79b0cee63c4c (patch)
tree1bbd4deacf934478dc41ff8f89fda6c2024ef42e /libstdc++-v3/src
parentb978e3c6ddddd482e917f1ed13abe355584a3ad2 (diff)
downloadgcc-9de27403457ffe6d85783946fefd79b0cee63c4c.tar.gz
2011-01-05 François Dumont <francois.cppdevs@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. * testsuite/23_containers/forward_list/debug/swap.cc: Remove now useless _GLIBCXX_DEBUG checks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168528 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r--libstdc++-v3/src/debug.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/libstdc++-v3/src/debug.cc b/libstdc++-v3/src/debug.cc
index 188495a3ea8..9074dfb0738 100644
--- a/libstdc++-v3/src/debug.cc
+++ b/libstdc++-v3/src/debug.cc
@@ -257,11 +257,7 @@ namespace __gnu_debug
_M_detach_single(_Safe_iterator_base* __it) throw ()
{
// Remove __it from this sequence's list
- if (__it->_M_prior)
- __it->_M_prior->_M_next = __it->_M_next;
- if (__it->_M_next)
- __it->_M_next->_M_prior = __it->_M_prior;
-
+ __it->_M_unlink();
if (_M_const_iterators == __it)
_M_const_iterators = __it->_M_next;
if (_M_iterators == __it)