|
Boost Users : |
Subject: Re: [Boost-users] [serialization] Polymorphic archives in 1.38
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-07-29 10:48:40
I've addressed this on the trunk.
Robert Ramey
Richard Hazlewood wrote:
> I've been using serialization with polymorphic archives from boost
> 1.38, but I had to apply the patch given by Vladimir Prus
> (http://lists.boost.org/boost- users/2009/03/45658.php) to get it
> linking (with MSVC71).
>
> E.g.:
>
> #include <boost/archive/polymorphic_text_oarchive.hpp>
> #include <boost/archive/polymorphic_text_iarchive.hpp>
>
> #if BOOST_VERSION <= 103800
> #include <boost/archive/impl/archive_pointer_oserializer.ipp>
> #include <boost/archive/impl/archive_pointer_iserializer.ipp>
> namespace boost { namespace archive {
> template class
> detail::archive_pointer_iserializer<polymorphic_text_oarchive>;
> template class
> detail::archive_pointer_iserializer<polymorphic_text_iarchive>;
> }}
> #endif
>
> #include <boost/serialization/export.hpp>
>
> #include <sstream>
>
> struct A
> {
> template <typename A>
> void serialize(A &, const unsigned)
> {}
> };
>
> BOOST_CLASS_EXPORT(A);
>
> void test_ser()
> {
> A a;
> std::ostringstream ostr;
> boost::archive::polymorphic_text_oarchive arch(ostr);
> arch & a;
> }
>
>
> Can anyone tell me if this has been addressed in 1.39? I.e. does the
> above compile and link with 1.39 (on MSVC71)?
>
> TIA.
>
> Chard.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net