
x.cpp below reproduces failures of test_exported* tests on several platforms using gcc 4.1 and higher. The tests fail with: terminate called after throwing an instance of 'boost::archive::archive_exception' what(): unregistered void cast When compiled with macro WORKS defined, i.e. when destructor of the base class is removed, reproducer succeeds. Does it give any clue? Thanks, Boris x.cpp ----- #include <fstream> #include <boost/archive/binary_oarchive.hpp> struct polymorphic_base { template<class Archive> void serialize(Archive&, const unsigned int) {} #ifndef WORKS virtual ~polymorphic_base(){} #endif }; struct polymorphic_derived : polymorphic_base { template<class Archive> void serialize(Archive&, const unsigned int) {} }; int main() { std::ofstream os("x.x"); boost::archive::binary_oarchive oa(os); polymorphic_base *rb = new polymorphic_derived; oa << BOOST_SERIALIZATION_NVP(rb); }