I'm having a newbie issue with serialization on a derived class with a
virtual function. I'm using the 1.33.0 build on VS 7.1.
I've shrunken my code to a micro-version of what I tried to do. Here I
have two classes, A and B, where B is a subclass of A. They share a
virtual function (ie B overrides dumpFunc in A). I've registered B with
BOOST_CLASS_EXPORT(B). I've turned on RTTI in VS 7.1 (/GR or
whatever). Still, I get a run time assert error in the boost library
telling me that the derived/base relationship wasn't registered. Here's
the code. I'll try to spell out the error below.
#include <string>
#include <fstream>
#include
junkProject.exe!boost::throw_exceptionboost::archive::archive_exception(const
boost::archive::archive_exception & e={...}) Line 40 C++
junkProject.exe!boost::archive::detail::save_pointer_type
::save_object_data(boost::archive::detail::basic_oarchive & ar={...}, const void * x=0x0012febc) Line 151 + 0x2b C++
junkProject.exe!boost::archive::detail::basic_oarchive_impl::save_object(boost::archive::detail::basic_oarchive
& ar={...}, const void * t=0x0012febc, const
boost::archive::detail::basic_oserializer & bos={...}) Line 271 C++
junkProject.exe!boost::archive::detail::basic_oarchive::save_object(const
void * x=0x0012febc, const boost::archive::detail::basic_oserializer &
bos={...}) Line 412 C++
junkProject.exe!boost::archive::detail::save_non_pointer_type
::save_standard::invoke(boost::archive::text_oarchive & ar={...}, const std::vector > & t={...}) Line 264 C++
junkProject.exe!boost::archive::detail::save_non_pointer_type