diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index ae4ba6ca..50d4fb0f 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -1674,8 +1674,7 @@ template node_constructor::~node_constructor() { if (node_) { if (node_constructed_) { - BOOST_UNORDERED_CALL_DESTROY( - node_allocator_traits, alloc_, boost::addressof(*node_)); + boost::unordered::detail::func::destroy(boost::addressof(*node_)); } node_allocator_traits::deallocate(alloc_, node_, 1); @@ -1689,8 +1688,7 @@ template void node_constructor::create_node() node_ = node_allocator_traits::allocate(alloc_, 1); - BOOST_UNORDERED_CALL_CONSTRUCT0( - node_allocator_traits, alloc_, boost::addressof(*node_)); + new (boost::addressof(*node_)) node(); node_constructed_ = true; } @@ -1721,8 +1719,7 @@ template node_tmp::~node_tmp() if (node_) { BOOST_UNORDERED_CALL_DESTROY( node_allocator_traits, alloc_, node_->value_ptr()); - BOOST_UNORDERED_CALL_DESTROY( - node_allocator_traits, alloc_, boost::addressof(*node_)); + boost::unordered::detail::func::destroy(boost::addressof(*node_)); node_allocator_traits::deallocate(alloc_, node_, 1); } } @@ -2221,8 +2218,7 @@ template node_holder::~node_holder() BOOST_UNORDERED_CALL_DESTROY( node_allocator_traits, constructor_.alloc_, p->value_ptr()); - BOOST_UNORDERED_CALL_DESTROY( - node_allocator_traits, constructor_.alloc_, boost::addressof(*p)); + boost::unordered::detail::func::destroy(boost::addressof(*p)); node_allocator_traits::deallocate(constructor_.alloc_, p, 1); } } @@ -2913,20 +2909,21 @@ struct table : boost::unordered::detail::functions(new_count); for (; constructed != end; ++constructed) { - BOOST_UNORDERED_CALL_CONSTRUCT0(bucket_allocator_traits, - bucket_alloc(), boost::addressof(*constructed)); + new (boost::addressof(*constructed)) bucket(); } if (buckets_) { // Copy the nodes to the new buckets, including the dummy // node if there is one. - BOOST_UNORDERED_CALL_CONSTRUCT1(bucket_allocator_traits, - bucket_alloc(), boost::addressof(*constructed), + new (boost::addressof(*constructed)) bucket( (buckets_ + static_cast(bucket_count_)) ->next_); ++constructed; @@ -2935,21 +2932,17 @@ struct table : boost::unordered::detail::functionsvalue_ptr()); - BOOST_UNORDERED_CALL_DESTROY( - node_allocator_traits, node_alloc(), boost::addressof(*n)); + boost::unordered::detail::func::destroy(boost::addressof(*n)); node_allocator_traits::deallocate(node_alloc(), n, 1); --size_; } @@ -3059,8 +3051,7 @@ struct table : boost::unordered::detail::functions(get_bucket(bucket_count_)->next_); - BOOST_UNORDERED_CALL_DESTROY( - node_allocator_traits, node_alloc(), boost::addressof(*n)); + boost::unordered::detail::func::destroy(boost::addressof(*n)); node_allocator_traits::deallocate(node_alloc(), n, 1); } @@ -3076,8 +3067,7 @@ struct table : boost::unordered::detail::functions