Move extract into place

This commit is contained in:
Daniel James
2017-04-20 22:59:00 +01:00
parent e2e9959389
commit 5eb10fd0b2
2 changed files with 52 additions and 52 deletions

View File

@ -218,19 +218,6 @@ template <class K, class T, class H, class P, class A> 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 K, class T, class H, class P, class A> class unordered_map
void insert(std::initializer_list<value_type>);
#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 K, class T, class H, class P, class A> 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 K, class T, class H, class P, class A> class unordered_multimap
void insert(std::initializer_list<value_type>);
#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);

View File

@ -216,19 +216,6 @@ template <class T, class H, class P, class A> 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 T, class H, class P, class A> class unordered_set
void insert(std::initializer_list<value_type>);
#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 T, class H, class P, class A> 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 T, class H, class P, class A> class unordered_multiset
void insert(std::initializer_list<value_type>);
#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);