Re: [Boost-bugs] [Boost C++ Libraries] #3990: [serialization] data loss in version field

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3990: [serialization] data loss in version field
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-16 05:39:35


#3990: [serialization] data loss in version field
-------------------------------+--------------------------------------------
  Reporter: vgough@… | Owner: ramey
      Type: Feature Requests | Status: reopened
 Milestone: To Be Determined | Component: serialization
   Version: Boost 1.43.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------------------------
Changes (by vgough@…):

  * status: closed => reopened
  * version: Boost 1.42.0 => Boost 1.43.0
  * resolution: wontfix =>
  * severity: Showstopper => Problem
  * milestone: Boost 1.43.0 => To Be Determined

Comment:

 The internal archive version checking gets in the way of providing
 backward compatibility.

 BOOST_CLASS_VERSION(..., 20080816) fails at compile time as of boost 1.43.
 However the internal comparison is not done with 8bit values!

 I could call BOOST_CLASS_VERSION(..., 255) as the largest 8bit value, but
 internally when boost 1.43 reads an archive with version 20080816, it
 truncates that to 26797, decides that is larger then 255 and throws an
 archive exception.

 My work around has been to implement a partial specialization of
 iserializer for my class which eliminates the version number check in
 load_object_data, so that I can apply my own version checking in my load
 function.

 Having to specialize functions in boost::archive::detail seems
 undesirable. Is there a supported way to stop boost from doing the
 archive version comparison itself?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3990#comment:7>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC