Unordered: Better swap assertion.

[SVN r80224]
This commit is contained in:
Daniel James
2012-08-25 21:54:18 +00:00
parent 8f86c2464e
commit f8968ab022

View File

@ -310,6 +310,11 @@ namespace boost { namespace unordered { namespace detail {
template <typename Propagate>
void swap(table& x, Propagate p)
{
// According to 23.2.1.8, if propagate_on_container_swap is
// false the behaviour is undefined unless the allocators
// are equal.
BOOST_ASSERT(p.value || this->node_alloc() == x.node_alloc());
boost::unordered::detail::set_hash_functions<hasher, key_equal>
op1(*this, x);
boost::unordered::detail::set_hash_functions<hasher, key_equal>