forked from boostorg/intrusive
Fixed ticket #12761 ("intrusive::set::swap doesn't swap the comparison function")
This commit is contained in:
@@ -3869,6 +3869,7 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std
|
|||||||
|
|
||||||
* Fixed bugs:
|
* Fixed bugs:
|
||||||
* [@https://svn.boost.org/trac/boost/ticket/12745 Boost Trac #12745: ['key_nodeptr_comp broken if the key type is void*]]
|
* [@https://svn.boost.org/trac/boost/ticket/12745 Boost Trac #12745: ['key_nodeptr_comp broken if the key type is void*]]
|
||||||
|
* [@https://svn.boost.org/trac/boost/ticket/12761 Boost Trac #12761: ['intrusive::set::swap doesn't swap the comparison function*]]
|
||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|
||||||
|
@@ -967,7 +967,7 @@ class bstree_impl
|
|||||||
void swap(bstree_impl& other)
|
void swap(bstree_impl& other)
|
||||||
{
|
{
|
||||||
//This can throw
|
//This can throw
|
||||||
::boost::adl_move_swap(this->comp(), this->comp());
|
::boost::adl_move_swap(this->comp(), other->comp());
|
||||||
//These can't throw
|
//These can't throw
|
||||||
node_algorithms::swap_tree(this->header_ptr(), node_ptr(other.header_ptr()));
|
node_algorithms::swap_tree(this->header_ptr(), node_ptr(other.header_ptr()));
|
||||||
this->sz_traits().swap(other.sz_traits());
|
this->sz_traits().swap(other.sz_traits());
|
||||||
|
@@ -354,9 +354,9 @@ class treap_impl
|
|||||||
//! <b>Throws</b>: If the comparison functor's swap call throws.
|
//! <b>Throws</b>: If the comparison functor's swap call throws.
|
||||||
void swap(treap_impl& other)
|
void swap(treap_impl& other)
|
||||||
{
|
{
|
||||||
tree_type::swap(other);
|
|
||||||
//This can throw
|
//This can throw
|
||||||
::boost::adl_move_swap(this->priv_pcomp(), other.priv_pcomp());
|
::boost::adl_move_swap(this->priv_pcomp(), other.priv_pcomp());
|
||||||
|
tree_type::swap(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
|
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
|
||||||
|
Reference in New Issue
Block a user