Boost C++ Libraries: Ticket #11498: Deserialization of a vector does not delete existing elements https://svn.boost.org/trac10/ticket/11498 <p> Problem deserializing (loading) an std::vector in boost 1.58.0. If the vector is not empty, the existing elements are not removed. The code compiles and serialization completes without errors, but after deserialization the vector has the deserialized vector elements appended after the previously existing elements. This is not the correct and documented behavior. Works fine in boost 1.56.0. See the attached program, which does the following: </p> <ul><li>Creates an object of class B, called b1, containing a vector of 3 objects of class A. Class A does have a public default constructor. </li><li>The b1 object is serialized (stored) using the boost serialization library. </li><li>A new object of class B, called b2, is created, and initialized with two elements. </li><li>Finally, the b2 object is loaded, using serialization, from the archive on which b1 was saved. </li><li>The program compiles and terminates without errors, but at the end the b2 object contains the initial 2 elements plus the 3 elements loaded from b1, for a total 5 elements. </li></ul><p> This is with gcc 4.8.2 on Linux Centos-7. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11498 Trac 1.4.3 pcarnevali@… Fri, 24 Jul 2015 20:29:15 GMT attachment set https://svn.boost.org/trac10/ticket/11498 https://svn.boost.org/trac10/ticket/11498 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">a.cpp</span> </li> </ul> Ticket Robert Ramey Tue, 29 Sep 2015 21:28:54 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11498#comment:1 https://svn.boost.org/trac10/ticket/11498#comment:1 <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> fixed changeset 50d5984 4/24/15 </p> Ticket