Opened 8 years ago
Closed 6 years ago
#11143 closed Bugs (fixed)
Problem with container::set::operator=()
| Reported by: | Owned by: | Ion Gaztañaga | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | container |
| Version: | Boost 1.57.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
There appeared to be a problem with set::operator=(). In the example below, the second assignment performs "move" every element from s1 to s2. The size of s1 is not changed.
Tested on VS2012 with boost 1.57
#include <boost/container/set.hpp>
int main()
{
boost::container::set<std::string> s1, s2;
s1.insert("1");
s1.insert("2");
s2 = s1;
assert(s2.size() == s1.size());
assert(s2 == s1); // OK
s2 = s1;
assert(s2.size() == s1.size());
assert(s2 == s1); // Error
return 0;
}
Note:
See TracTickets
for help on using tickets.

Your code seems to work fine with current develop and master (you can try Boost 1.58 beta) code. Can we consider this fixed?