From e58370b4fff4f4c920450dfb65daa81a93d1b20e Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 17 Aug 2016 12:08:15 +0100 Subject: [PATCH] Move emplace before emplace_impl in equivalent.hpp --- include/boost/unordered/detail/equivalent.hpp | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/include/boost/unordered/detail/equivalent.hpp b/include/boost/unordered/detail/equivalent.hpp index 691d3154..f3ddc47f 100644 --- a/include/boost/unordered/detail/equivalent.hpp +++ b/include/boost/unordered/detail/equivalent.hpp @@ -375,25 +375,6 @@ namespace boost { namespace unordered { namespace detail { return iterator(n); } - iterator emplace_impl(node_pointer n) - { - node_tmp a(n, this->node_alloc()); - key_type const& k = this->get_key(a.node_->value()); - std::size_t key_hash = this->hash(k); - iterator position = this->find_node(key_hash, k); - this->reserve_for_insert(this->size_ + 1); - return this->add_node(a.release(), key_hash, position); - } - - void emplace_impl_no_rehash(node_pointer n) - { - node_tmp a(n, this->node_alloc()); - key_type const& k = this->get_key(a.node_->value()); - std::size_t key_hash = this->hash(k); - iterator position = this->find_node(key_hash, k); - this->add_node(a.release(), key_hash, position); - } - #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) # if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) iterator emplace(boost::unordered::detail::emplace_args1< @@ -420,6 +401,25 @@ namespace boost { namespace unordered { namespace detail { this->node_alloc(), BOOST_UNORDERED_EMPLACE_FORWARD))); } + iterator emplace_impl(node_pointer n) + { + node_tmp a(n, this->node_alloc()); + key_type const& k = this->get_key(a.node_->value()); + std::size_t key_hash = this->hash(k); + iterator position = this->find_node(key_hash, k); + this->reserve_for_insert(this->size_ + 1); + return this->add_node(a.release(), key_hash, position); + } + + void emplace_impl_no_rehash(node_pointer n) + { + node_tmp a(n, this->node_alloc()); + key_type const& k = this->get_key(a.node_->value()); + std::size_t key_hash = this->hash(k); + iterator position = this->find_node(key_hash, k); + this->add_node(a.release(), key_hash, position); + } + //////////////////////////////////////////////////////////////////////// // Insert range methods