Boost logo

Boost Users :

Subject: [Boost-users] serialization: binary archives from 1.44 do not work in 1.46.1
From: Filip Peters (filippeters_at_[hidden])
Date: 2011-07-11 19:05:14


as a follow-up: I checked the file basic_archive.cpp in boost1.44 and in 1.46.1: in 1.44 version number is set to 7: BOOST_ARCHIVE_VERSION(){     return library_version_type(7); } while the comments in the file for 1.46.1 say: // 8 - Boost 1.44 //     separated version_type into library_version_type and class_version_type //     changed version_type to be stored as 8 bits. I guess my fix for files made with 1.44 version, changing lib version from 7 into 8 should be correct, since 1.46.1 is making the wrong assumption about version_type from version 1.44 best regards, Filip Peters. ----- Original Message ----- From: Filip Peters <filippeters_at_[hidden]> To: "boost-users_at_[hidden]" <boost-users_at_[hidden]> Cc: Sent: Friday, July 8, 2011 12:40 PM Subject: [Boost-users] serialization: binary archives from 1.44 to 1.46.1... just ran into this, it seems binary archives made with 1.44 do not read in the latest(1.46.1) version. Since I read about fix_six.cpp, I thought let's try modifying the lib version, maybe that helps. (maybe somebody put fixes in that break other things?) If I change the lib version from 7 to 8, it reads in correctly..... if(boost::archive::library_version_type(7) == lvt){ lvt = boost::archive::library_version_type(8); fb.pubseekpos(26, std::ios_base::out); fb.sputn(reinterpret_cast<const char *>(& lvt), sizeof(lvt)); } (without it, the int at offset 0x26 is already reading wrong in the latest version....) Files from my program created with 1.44 and 1.46.1, with only one object in them, first element an int, only differed in the version byte. I'm just wondering if placing this fix in my reader code is going to work always, without delving too much in the serialization library changes. Best regards, Filip Peters _______________________________________________ Boost-users mailing list Boost-users_at_[hidden] http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net