diff options
author | fdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-05 20:52:36 +0000 |
---|---|---|
committer | fdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-05 20:52:36 +0000 |
commit | 9de27403457ffe6d85783946fefd79b0cee63c4c (patch) | |
tree | 1bbd4deacf934478dc41ff8f89fda6c2024ef42e /libstdc++-v3/include/debug/safe_base.h | |
parent | b978e3c6ddddd482e917f1ed13abe355584a3ad2 (diff) | |
download | gcc-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/include/debug/safe_base.h')
-rw-r--r-- | libstdc++-v3/include/debug/safe_base.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libstdc++-v3/include/debug/safe_base.h b/libstdc++-v3/include/debug/safe_base.h index 2ebdd89b58f..1348004cb57 100644 --- a/libstdc++-v3/include/debug/safe_base.h +++ b/libstdc++-v3/include/debug/safe_base.h @@ -146,6 +146,16 @@ namespace __gnu_debug /** Reset all member variables */ void _M_reset() throw (); + + /** Unlink itself */ + void + _M_unlink() throw () + { + if (_M_prior) + _M_prior->_M_next = _M_next; + if (_M_next) + _M_next->_M_prior = _M_prior; + } }; /** |