Re: [Boost-bugs] [Boost C++ Libraries] #5106: std::bad_cast thrown in the boost::archive::basic_binary_(o|i)primitive constructor

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5106: std::bad_cast thrown in the boost::archive::basic_binary_(o|i)primitive constructor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-01-23 02:34:52


#5106: std::bad_cast thrown in the boost::archive::basic_binary_(o|i)primitive
constructor
--------------------------------------+-------------------------------------
  Reporter: gleize.pierre@… | Owner: ramey
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: serialization
   Version: Boost 1.45.0 | Severity: Problem
Resolution: | Keywords: bad_cast serialization archive constructor
--------------------------------------+-------------------------------------

Comment (by ramey):

 Does making the following change in your test address the problem?

 {{{
    std::ofstream ofs( "./test.dat", ios::binary ); // add ios::binary
    ::boost::archive::binary_oarchive oa( ofs );

 }}}

 Note you fix in the header would override the definition in the library.
 This could cause a number of unanticipated side effects. You might check
 the definition in the library to see how it compares to yours.
 Robert Ramey

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5106#comment:1>
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:05 UTC