Modify

Ticket #12761 (closed Bugs: fixed)

Opened 3 months ago

Last modified 3 weeks ago

intrusive::set::swap doesn't swap the comparison function

Reported by: fdegros@… Owned by: igaztanaga
Milestone: To Be Determined Component: intrusive
Version: Boost 1.60.0 Severity: Problem
Keywords: Cc: fdegros@…

Description

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).

Attachments

Change History

comment:1 Changed 2 months ago by fdegros@…

Ping? Any idea or progress on this topic?

comment:2 Changed 2 months ago by igaztanaga

Thanks for the report and the ping. Yes, it's clearly a bug, I'd try to fix it ASAP.

comment:3 Changed 3 weeks ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

This was fixed some weeks ago in commit:

https://github.com/boostorg/intrusive/commit/6510ac498e0f9e54bf2a962a703352dac54158d2

Thanks for the report.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.