mirror of
https://github.com/boostorg/unordered.git
synced 2025-08-01 20:34:28 +02:00
Move extract into place
This commit is contained in:
@@ -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;
|
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
|
// emplace
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
#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>);
|
void insert(std::initializer_list<value_type>);
|
||||||
#endif
|
#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 insert(BOOST_RV_REF(node_type) np)
|
||||||
{
|
{
|
||||||
insert_return_type result;
|
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;
|
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
|
// emplace
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
#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>);
|
void insert(std::initializer_list<value_type>);
|
||||||
#endif
|
#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)
|
iterator insert(BOOST_RV_REF(node_type) np)
|
||||||
{
|
{
|
||||||
return table_.move_insert_node_type(np);
|
return table_.move_insert_node_type(np);
|
||||||
|
@@ -216,19 +216,6 @@ template <class T, class H, class P, class A> class unordered_set
|
|||||||
|
|
||||||
size_type max_size() const BOOST_NOEXCEPT;
|
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
|
// emplace
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
#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>);
|
void insert(std::initializer_list<value_type>);
|
||||||
#endif
|
#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 insert(BOOST_RV_REF(node_type) np)
|
||||||
{
|
{
|
||||||
insert_return_type result;
|
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;
|
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
|
// emplace
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
#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>);
|
void insert(std::initializer_list<value_type>);
|
||||||
#endif
|
#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)
|
iterator insert(BOOST_RV_REF(node_type) np)
|
||||||
{
|
{
|
||||||
return table_.move_insert_node_type(np);
|
return table_.move_insert_node_type(np);
|
||||||
|
Reference in New Issue
Block a user