Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1941: polymorphic archive interface doesn't match other archive interfaces
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-06-29 15:23:37
#1941: polymorphic archive interface doesn't match other archive interfaces
---------------------------------------+------------------------------------
Reporter: mighty_ernie_at_[hidden] | Owner: ramey
Type: Bugs | Status: closed
Milestone: Boost 1.35.1 | Component: serialization
Version: Boost 1.35.0 | Severity: Problem
Resolution: fixed | Keywords: polymorphic
---------------------------------------+------------------------------------
Changes (by ramey):
* status: reopened => closed
* resolution: => fixed
Comment:
The whole point of the polymorphic archive is to permit usage of a common
interface without depending on the specific one. So really one is
expected to use the base class "accessors"
try the following:
{{{
// Create the target archive object, as input
boost::archive::polymorphic_iarchive &targetData =
boost::archive::polymorphic_binary_iarchive targetData(
std::ifstream(sourcePath.external_directory_string().c_str())
);
// If the versioning implies that an update is not required
if(targetData.get_library_version() == mTypeVersions[GetType?(asset)]) {
// Load from the target // ...
}
}}}
If that fails let me know.
Robert Ramey
-- Ticket URL: <http://svn.boost.org/trac/boost/ticket/1941#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:49:58 UTC