[serialization] Polymorphic archives in 1.38

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.

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.
participants (2)
-
Richard Hazlewood
-
Robert Ramey