Boost logo

Boost Users :

Subject: [Boost-users] serialization: binary archives from 1.44 to 1.46.1...
From: Filip Peters (filippeters_at_[hidden])
Date: 2011-07-08 15:40:58

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 list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at