From 5eb10fd0b235bc9e468e7f6f85ee6ecd26d45bec Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 20 Apr 2017 22:59:00 +0100 Subject: [PATCH] Move extract into place --- include/boost/unordered/unordered_map.hpp | 52 +++++++++++------------ include/boost/unordered/unordered_set.hpp | 52 +++++++++++------------ 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index 0a257b7e..ec3d891e 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -218,19 +218,6 @@ template class unordered_map size_type max_size() const BOOST_NOEXCEPT; - // extract - - node_type extract(const_iterator position) - { - return node_type( - table_.extract_by_iterator(position), table_.node_alloc()); - } - - node_type extract(const key_type& k) - { - return node_type(table_.extract_by_key(k), table_.node_alloc()); - } - // emplace #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) @@ -407,6 +394,19 @@ template class unordered_map void insert(std::initializer_list); #endif + // extract + + node_type extract(const_iterator position) + { + return node_type( + table_.extract_by_iterator(position), table_.node_alloc()); + } + + node_type extract(const key_type& k) + { + return node_type(table_.extract_by_key(k), table_.node_alloc()); + } + insert_return_type insert(BOOST_RV_REF(node_type) np) { insert_return_type result; @@ -970,19 +970,6 @@ template class unordered_multimap size_type max_size() const BOOST_NOEXCEPT; - // extract - - node_type extract(const_iterator position) - { - return node_type( - table_.extract_by_iterator(position), table_.node_alloc()); - } - - node_type extract(const key_type& k) - { - return node_type(table_.extract_by_key(k), table_.node_alloc()); - } - // emplace #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) @@ -1150,6 +1137,19 @@ template class unordered_multimap void insert(std::initializer_list); #endif + // extract + + node_type extract(const_iterator position) + { + return node_type( + table_.extract_by_iterator(position), table_.node_alloc()); + } + + node_type extract(const key_type& k) + { + return node_type(table_.extract_by_key(k), table_.node_alloc()); + } + iterator insert(BOOST_RV_REF(node_type) np) { return table_.move_insert_node_type(np); diff --git a/include/boost/unordered/unordered_set.hpp b/include/boost/unordered/unordered_set.hpp index aee65b41..d2497620 100644 --- a/include/boost/unordered/unordered_set.hpp +++ b/include/boost/unordered/unordered_set.hpp @@ -216,19 +216,6 @@ template class unordered_set size_type max_size() const BOOST_NOEXCEPT; - // extract - - node_type extract(const_iterator position) - { - return node_type( - table_.extract_by_iterator(position), table_.node_alloc()); - } - - node_type extract(const key_type& k) - { - return node_type(table_.extract_by_key(k), table_.node_alloc()); - } - // emplace #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) @@ -387,6 +374,19 @@ template class unordered_set void insert(std::initializer_list); #endif + // extract + + node_type extract(const_iterator position) + { + return node_type( + table_.extract_by_iterator(position), table_.node_alloc()); + } + + node_type extract(const key_type& k) + { + return node_type(table_.extract_by_key(k), table_.node_alloc()); + } + insert_return_type insert(BOOST_RV_REF(node_type) np) { insert_return_type result; @@ -698,19 +698,6 @@ template class unordered_multiset size_type max_size() const BOOST_NOEXCEPT; - // extract - - node_type extract(const_iterator position) - { - return node_type( - table_.extract_by_iterator(position), table_.node_alloc()); - } - - node_type extract(const key_type& k) - { - return node_type(table_.extract_by_key(k), table_.node_alloc()); - } - // emplace #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) @@ -860,6 +847,19 @@ template class unordered_multiset void insert(std::initializer_list); #endif + // extract + + node_type extract(const_iterator position) + { + return node_type( + table_.extract_by_iterator(position), table_.node_alloc()); + } + + node_type extract(const key_type& k) + { + return node_type(table_.extract_by_key(k), table_.node_alloc()); + } + iterator insert(BOOST_RV_REF(node_type) np) { return table_.move_insert_node_type(np);