diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-22 13:27:16 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-22 13:27:16 +0000 |
commit | ac0cb712b406de7eac98655b5384b343c96d51a5 (patch) | |
tree | 4cc822a189910f33f4e66596db19082a4d0f4ddb /libstdc++-v3/include/debug | |
parent | 61cb2bc306111a3ddde8383a208142255ce75210 (diff) | |
download | ppe42-gcc-ac0cb712b406de7eac98655b5384b343c96d51a5.tar.gz ppe42-gcc-ac0cb712b406de7eac98655b5384b343c96d51a5.zip |
* include/debug/forward_list (forward_list::splice_after): Check
allocators are equal.
* src/c++11/debug.cc: Fix spelling.
* testsuite/23_containers/forward_list/debug/splice_after5_neg.cc:
New.
* testsuite/23_containers/forward_list/debug/splice_after6_neg.cc:
Likewise.
* testsuite/23_containers/forward_list/debug/splice_after7_neg.cc:
Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186669 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/debug')
-rw-r--r-- | libstdc++-v3/include/debug/forward_list | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libstdc++-v3/include/debug/forward_list b/libstdc++-v3/include/debug/forward_list index f4a7ee96df0..8ad4336663e 100644 --- a/libstdc++-v3/include/debug/forward_list +++ b/libstdc++-v3/include/debug/forward_list @@ -409,6 +409,10 @@ namespace __debug _GLIBCXX_DEBUG_VERIFY(&__list != this, _M_message(__gnu_debug::__msg_self_splice) ._M_sequence(*this, "this")); + _GLIBCXX_DEBUG_VERIFY(__list.get_allocator() == this->get_allocator(), + _M_message(__gnu_debug::__msg_splice_alloc) + ._M_sequence(*this) + ._M_sequence(__list, "__list")); this->_M_transfer_from_if(__list, [&__list](_Base_const_iterator __it) { return __it != __list._M_base().cbefore_begin() @@ -433,6 +437,10 @@ namespace __debug _M_message(__gnu_debug::__msg_splice_other) ._M_iterator(__i, "__i") ._M_sequence(__list, "__list")); + _GLIBCXX_DEBUG_VERIFY(__list.get_allocator() == this->get_allocator(), + _M_message(__gnu_debug::__msg_splice_alloc) + ._M_sequence(*this) + ._M_sequence(__list, "__list")); // _GLIBCXX_RESOLVE_LIB_DEFECTS // 250. splicing invalidates iterators @@ -469,6 +477,10 @@ namespace __debug ._M_sequence(__list, "list") ._M_iterator(__before, "before") ._M_iterator(__last, "last")); + _GLIBCXX_DEBUG_VERIFY(__list.get_allocator() == this->get_allocator(), + _M_message(__gnu_debug::__msg_splice_alloc) + ._M_sequence(*this) + ._M_sequence(__list, "__list")); for (_Base_const_iterator __tmp = std::next(__before.base()); __tmp != __last.base(); ++__tmp) |