Boost C++ Libraries: Ticket #3638: de-serialization of shared_ptr https://svn.boost.org/trac10/ticket/3638 <p> De-serialization of shared_ptr does not compile anymore. (This code did compile in 1.40.0) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3638 Trac 1.4.3 Christoph Duelli Wed, 18 Nov 2009 16:30:22 GMT attachment set https://svn.boost.org/trac10/ticket/3638 https://svn.boost.org/trac10/ticket/3638 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">serbug.cpp</span> </li> </ul> <p> de-serializataion of shared_ptr fails to compile (Boost 1.41); linux gcc 4.2.1 </p> Ticket emilm@… Sun, 22 Nov 2009 21:20:39 GMT <link>https://svn.boost.org/trac10/ticket/3638#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3638#comment:1</guid> <description> <p> Temporary fix is to make the serialized class polymorphic by adding at least one polymorphic function (ex. the destructor). To fix this you need to patch boost/archive/shared_ptr_helper.hpp and at line 111 after return add an &amp;. So, </p> <pre class="wiki"> return &amp;boost::serialization::singleton&lt; ... </pre><p> instead of </p> <pre class="wiki"> return boost::serialization::singleton&lt; ... </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Fri, 27 Nov 2009 22:25:31 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3638#comment:2 https://svn.boost.org/trac10/ticket/3638#comment:2 <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 in trunk - will migrate to release when tests pass </p> <p> Robert Ramey </p> Ticket