$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r80224 - trunk/boost/unordered/detail
From: dnljms_at_[hidden]
Date: 2012-08-25 17:54:19
Author: danieljames
Date: 2012-08-25 17:54:18 EDT (Sat, 25 Aug 2012)
New Revision: 80224
URL: http://svn.boost.org/trac/boost/changeset/80224
Log:
Unordered: Better swap assertion.
Text files modified:
trunk/boost/unordered/detail/table.hpp | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
Modified: trunk/boost/unordered/detail/table.hpp
==============================================================================
--- trunk/boost/unordered/detail/table.hpp (original)
+++ trunk/boost/unordered/detail/table.hpp 2012-08-25 17:54:18 EDT (Sat, 25 Aug 2012)
@@ -310,6 +310,11 @@
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>