[Boost-bugs] [Boost C++ Libraries] #12761: intrusive::set::swap doesn't swap the comparison function

Subject: [Boost-bugs] [Boost C++ Libraries] #12761: intrusive::set::swap doesn't swap the comparison function
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-01-16 05:55:07


#12761: intrusive::set::swap doesn't swap the comparison function
------------------------------+------------------------
 Reporter: fdegros@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: intrusive
  Version: Boost 1.60.0 | Severity: Problem
 Keywords: |
------------------------------+------------------------
 If you have two Boost intrusive set or multiset objets with a stateful
 comparison function, swapping them with the swap method doesn't seem to
 swap the state of their comparison functions.

 Is it normal?

 Using std::swap doesn't swap their comparison function either, which seems
 to suggest that set's and multiset's move assignment operator doesn't move
 the comparison function.

 However, it seems that set's and multiset's move constructor does copy the
 comparison function (by using its copy constructor, not its move
 constructor though).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12761>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC