
I know that we can serialize/deserialize a derived type through a base type pointer (using register_type()). But I cannot serialize a derived type and deserialize it through a base type pointer. It seems to me the data type in serialization and deserialization should be extactly the same one. What I want is, Base{...}; Derived : Base{...}; Derived d; boost::archive::binary_oarchive oa(...); oa << d; // serialize a derived object Base *b; boost::archive::binary_iarchive ia(...); ia.register_type(); ia >> b // Deseiralize to a base type pointer I have tried this but it does not work. Is there any way to make this work? Many thanks!!! -- View this message in context: http://boost.2283326.n4.nabble.com/Serialization-How-to-serialize-a-derived-... Sent from the Boost - Users mailing list archive at Nabble.com.