From 31211a607f1c294f973eed10e54e461a8ef920ba Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 9 Nov 2014 23:34:52 +0000 Subject: [PATCH] Remove assertion that used moved allocator. Fixes #10777. --- doc/changes.qbk | 2 ++ include/boost/unordered/detail/table.hpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/changes.qbk b/doc/changes.qbk index 8797dc90..acc43088 100644 --- a/doc/changes.qbk +++ b/doc/changes.qbk @@ -263,5 +263,7 @@ C++11 support has resulted in some breaking changes: * Remove unnecessary template parameter from const iterators. * Rename private `iterator` typedef in some iterator classes, as it confuses some traits classes. +* Fix move assignment with stateful, propagate_on_container_move_assign + allocators ([ticket 10777]). [endsect] diff --git a/include/boost/unordered/detail/table.hpp b/include/boost/unordered/detail/table.hpp index ddb1e598..87012b5e 100644 --- a/include/boost/unordered/detail/table.hpp +++ b/include/boost/unordered/detail/table.hpp @@ -500,9 +500,11 @@ namespace boost { namespace unordered { namespace detail { op2.commit(); } + // Only call with nodes allocated with the currect allocator, or + // one that is equal to it. (Can't assert because other's + // allocators might have already been moved). void move_buckets_from(table& other) { - BOOST_ASSERT(node_alloc() == other.node_alloc()); BOOST_ASSERT(!buckets_); buckets_ = other.buckets_; bucket_count_ = other.bucket_count_;