mirror of
https://github.com/boostorg/unordered.git
synced 2025-05-10 07:34:00 +00:00
asserted allocator equality on unordered_node_(map|set)::merge and updated docs
This commit is contained in:
parent
ea4fc5e66d
commit
dbe93c765c
@ -1216,6 +1216,12 @@ template<class H2, class P2>
|
|||||||
|
|
||||||
Transfers all the element nodes from `source` whose key is not already present in `*this`.
|
Transfers all the element nodes from `source` whose key is not already present in `*this`.
|
||||||
|
|
||||||
|
[horizontal]
|
||||||
|
Requires:;; `this\->get_allocator() == source.get_allocator()`.
|
||||||
|
Notes:;; Invalidates iterators to the elements transferred.
|
||||||
|
If the resulting size of `*this` is greater than its original maximum load,
|
||||||
|
invalidates all iterators associated to `*this`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
=== Observers
|
=== Observers
|
||||||
|
@ -1030,6 +1030,12 @@ template<class H2, class P2>
|
|||||||
|
|
||||||
Transfers all the element nodes from `source` whose key is not already present in `*this`.
|
Transfers all the element nodes from `source` whose key is not already present in `*this`.
|
||||||
|
|
||||||
|
[horizontal]
|
||||||
|
Requires:;; `this\->get_allocator() == source.get_allocator()`.
|
||||||
|
Notes:;; Invalidates iterators to the elements transferred.
|
||||||
|
If the resulting size of `*this` is greater than its original maximum load,
|
||||||
|
invalidates all iterators associated to `*this`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
=== Observers
|
=== Observers
|
||||||
|
@ -529,6 +529,7 @@ namespace boost {
|
|||||||
unordered_node_map<key_type, mapped_type, H2, P2, allocator_type>&
|
unordered_node_map<key_type, mapped_type, H2, P2, allocator_type>&
|
||||||
source)
|
source)
|
||||||
{
|
{
|
||||||
|
BOOST_ASSERT(get_allocator() == source.get_allocator());
|
||||||
table_.merge(source.table_);
|
table_.merge(source.table_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -537,6 +538,7 @@ namespace boost {
|
|||||||
unordered_node_map<key_type, mapped_type, H2, P2, allocator_type>&&
|
unordered_node_map<key_type, mapped_type, H2, P2, allocator_type>&&
|
||||||
source)
|
source)
|
||||||
{
|
{
|
||||||
|
BOOST_ASSERT(get_allocator() == source.get_allocator());
|
||||||
table_.merge(std::move(source.table_));
|
table_.merge(std::move(source.table_));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,12 +415,14 @@ namespace boost {
|
|||||||
template <class H2, class P2>
|
template <class H2, class P2>
|
||||||
void merge(unordered_node_set<key_type, H2, P2, allocator_type>& source)
|
void merge(unordered_node_set<key_type, H2, P2, allocator_type>& source)
|
||||||
{
|
{
|
||||||
|
BOOST_ASSERT(get_allocator() == source.get_allocator());
|
||||||
table_.merge(source.table_);
|
table_.merge(source.table_);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class H2, class P2>
|
template <class H2, class P2>
|
||||||
void merge(unordered_node_set<key_type, H2, P2, allocator_type>&& source)
|
void merge(unordered_node_set<key_type, H2, P2, allocator_type>&& source)
|
||||||
{
|
{
|
||||||
|
BOOST_ASSERT(get_allocator() == source.get_allocator());
|
||||||
table_.merge(std::move(source.table_));
|
table_.merge(std::move(source.table_));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user