I got the polymorphic behavior on serializing classes descending from my
root Asset class worked out, as well as the (tiny) changes required to get
the boost serialization library to load the objects my way :)
Basically it amounted to having to adding a set of symmetrical methods in
common_oarchive and common_archive, which the user-derived archive override.
common_oarchive:
template<class T>
bool save_object_ptr_custom(T& t)
{
return false;
}
common_iarchive:
template<class T>
bool load_object_ptr_custom(T& t)
{
return false;
}
pointer_oserializer::save_object_ptr -- wrap the last few lines with the
if implementing the callback:
if (!ar_impl.save_object_ptr_custom(t))
{
boost::serialization::save_construct_data_adl