Boost C++ Libraries: Ticket #11143: Problem with container::set::operator=() https://svn.boost.org/trac10/ticket/11143 <p> 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 </p> <pre class="wiki">#include &lt;boost/container/set.hpp&gt; int main() { boost::container::set&lt;std::string&gt; 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; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11143 Trac 1.4.3 Ion Gaztañaga Tue, 31 Mar 2015 09:54:59 GMT <link>https://svn.boost.org/trac10/ticket/11143#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11143#comment:1</guid> <description> <p> Your code seems to work fine with current develop and master (you can try Boost 1.58 beta) code. Can we consider this fixed? </p> </description> <category>Ticket</category> </item> <item> <author>Andrey Martin <martin@…></author> <pubDate>Wed, 01 Apr 2015 07:14:12 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11143#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11143#comment:2</guid> <description> <p> Yes we can. I'd add a unit test to avoid this issue in the future. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 06 Dec 2015 08:58:19 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11143#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11143#comment:3</guid> <description> <p> Ion? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Fri, 13 May 2016 22:03:37 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11143#comment:4 https://svn.boost.org/trac10/ticket/11143#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Declared as fixed ;-) </p> Ticket