Boost C++ Libraries: Ticket #6730: error reading archive created by old version when it contains pointer https://svn.boost.org/trac10/ticket/6730 <p> Problem is similar to ticket 4660. Fwiw we just discovered a gap in our unit tests. :( </p> <p> Code below contains our local fix. Note that we only have used lib ver 3 and lib ver 5 and that this is the reason the fix only targets those versions. </p> <p> One last word, I checked the latest code ( 1.49 ) and it seems to contain the same flaw as 1.45. </p> <pre class="wiki"> void load_override(class_id_type &amp; t, int version){ library_version_type lvt = this-&gt;get_library_version(); if(boost::archive::library_version_type(7) &lt; lvt){ this-&gt;detail_common_iarchive::load_override(t, version); } else if(boost::archive::library_version_type(6) &lt; lvt){ int_least16_t x=0; * this-&gt;This() &gt;&gt; x; t = boost::archive::class_id_type(x); } else if(boost::archive::library_version_type(3) == lvt || boost::archive::library_version_type(5) == lvt ){ #pragma message( "CTMS fix for serialization bug ( lack of backwards compatability ) introduced by boost 1.45." ) int_least16_t x=0; * this-&gt;This() &gt;&gt; x; t = boost::archive::class_id_type(x); } else{ int x=0; * this-&gt;This() &gt;&gt; x; t = boost::archive::class_id_type(x); } } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6730 Trac 1.4.3 viboes Mon, 28 May 2012 17:22:50 GMT component changed; owner set https://svn.boost.org/trac10/ticket/6730#comment:1 https://svn.boost.org/trac10/ticket/6730#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Robert Ramey</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">serialization</span> </li> </ul> Ticket