id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5640,serialization vector backward compatibility problem,jfaust@…,Robert Ramey,"We've recently upgraded from 1.40.0 to 1.46.1 and uncovered the following problem with vector serialization. In 1.40.0, the code to load a vector is: {{{ #ifndef BOOST_SERIALIZATION_VECTOR_VERSION #define BOOST_SERIALIZATION_VECTOR_VERSION 4 #endif ... template inline void load( Archive & ar, std::vector &t, const unsigned int /* file_version */, mpl::true_ ){ collection_size_type count(t.size()); ar >> BOOST_SERIALIZATION_NVP(count); t.resize(count); unsigned int item_version=0; if(BOOST_SERIALIZATION_VECTOR_VERSION < ar.get_library_version()) ar >> BOOST_SERIALIZATION_NVP(item_version); if (!t.empty()) ar >> make_array(detail::get_data(t),t.size()); } }}} In 1.46.1, the same method is {{{ #ifndef BOOST_SERIALIZATION_VECTOR_VERSIONED #define BOOST_SERIALIZATION_VECTOR_VERSIONED(V) (V==4 || V==5) #endif ... template inline void load( Archive & ar, std::vector &t, const unsigned int /* file_version */, mpl::true_ ){ collection_size_type count(t.size()); ar >> BOOST_SERIALIZATION_NVP(count); t.resize(count); unsigned int item_version=0; if(BOOST_SERIALIZATION_VECTOR_VERSIONED(ar.get_library_version())) { ar >> BOOST_SERIALIZATION_NVP(item_version); } if (!t.empty()) ar >> make_array(detail::get_data(t),t.size()); } }}} Look at the difference when reading in a vector from serialization library version 4. In 1.40.0, the logic assumes that versions greater than 4 should read in item_version. In 1.46.1, the logic assumes that versions equal to 4 or 5 should read in item_version. So, if restoring a file saved with version 4, 1.40.0 will not ready in item_version but 1.46.1 will. We are working around this issue with a trick similar to the header vector_135.hpp, but would like to see this fixed in an upcoming release. After some research, I found this change was made with changeset 55415 for ticket 2271. ",Bugs,new,To Be Determined,serialization,Boost 1.46.1,Regression,,,