#include #include #include using namespace boost; struct B { virtual ~B() {} template void serialize(A &, const unsigned) {} }; struct D : B { template void serialize(A &a, const unsigned) { a & serialization::base_object(*this); } }; void register_type_ambig() { B *bp = new D; std::ostringstream ostr; archive::polymorphic_text_oarchive oa(ostr); oa.register_type(); oa & bp; delete bp; }