Re: [Boost-bugs] [Boost C++ Libraries] #7301: Inconsistent use of load_/save_override for serialized file signature

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7301: Inconsistent use of load_/save_override for serialized file signature
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-29 16:21:41


#7301: Inconsistent use of load_/save_override for serialized file signature
-----------------------------------------------------+----------------------
  Reporter: Paul Barba <paul.barba@…> | Owner: ramey
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: serialization
   Version: Boost 1.51.0 | Severity: Problem
Resolution: | Keywords: serialization, save_override, file signature
-----------------------------------------------------+----------------------

Comment (by Paul Barba <paul.barba@…>):

 Well, you could just read the signature in basic_binary_iarchive.ipp like
 you write it:
 {{{
 this->This() >> file_signature;
 }}}
 But I'm guessing the code was changed because that causes problems in some
 test case involving an invalid file? So rather than handling signatures
 with the user overloaded string functions, you could just do the saving of
 the signature string manually as well, something like the following in
 init() in basic_binary_oarchive.ipp:
 {{{
 std::size_t l = file_signature.size()
 this->This()->save(l);
 this->This()->save_binary(file_signature, l);
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7301#comment:3>
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:10 UTC