[Boost-bugs] [Boost C++ Libraries] #11143: Problem with container::set::operator=()

Subject: [Boost-bugs] [Boost C++ Libraries] #11143: Problem with container::set::operator=()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-03-25 12:22:33


#11143: Problem with container::set::operator=()
--------------------------------------+------------------------
 Reporter: Andrey Martin <martin@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
--------------------------------------+------------------------
 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. [[BR]][[BR]]

 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;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11143>
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:18 UTC