summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/debug/macros.h
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-05 21:10:27 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-05 21:10:27 +0000
commitb41dd924b7c5590e4e2089fa6733c70522f505df (patch)
tree553f439a5157ae50ed27353875aa3cac4fd0c23b /libstdc++-v3/include/debug/macros.h
parent6a2dcb1ff09cc7cdb473d4f864413da155ef480c (diff)
downloadgcc-b41dd924b7c5590e4e2089fa6733c70522f505df.tar.gz
* include/profile/forward_list: Update to meet allocator-aware
requirements. * include/debug/forward_list: Likewise. * include/debug/vector: Verify allocators are swapped or equal. * include/debug/macros.h (__glibcxx_check_equal_allocs): Define. * include/debug/formatter.h: Add new debug message. * src/c++11/debug.cc: Likewise. * testsuite/23_containers/forward_list/allocator/swap.cc: Do not swap containers with non-propagating, non-equal allocators. * testsuite/23_containers/vector/allocator/swap.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/debug/macros.h')
-rw-r--r--libstdc++-v3/include/debug/macros.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libstdc++-v3/include/debug/macros.h b/libstdc++-v3/include/debug/macros.h
index 3df0c9bd31d..30606d5bf66 100644
--- a/libstdc++-v3/include/debug/macros.h
+++ b/libstdc++-v3/include/debug/macros.h
@@ -333,6 +333,11 @@ _GLIBCXX_DEBUG_VERIFY(_F > 0.0f, \
_M_message(__gnu_debug::__msg_valid_load_factor) \
._M_sequence(*this, "this"))
+#define __glibcxx_check_equal_allocs(_Other) \
+_GLIBCXX_DEBUG_VERIFY(this->get_allocator() == _Other.get_allocator(), \
+ _M_message(__gnu_debug::__msg_equal_allocs) \
+ ._M_sequence(*this, "this"))
+
#ifdef _GLIBCXX_DEBUG_PEDANTIC
# define __glibcxx_check_string(_String) _GLIBCXX_DEBUG_ASSERT(_String != 0)
# define __glibcxx_check_string_len(_String,_Len) \