[serialization] "unregistered void cast" error -- what does it mean?
Hi all I have been getting an 'unregistered void cast' *runtime* error message following some apparently unrelated changes to my code. Can anyone possibly clarify the cases when it is necessary to use "void_cast_register" with Boost::Serialization? I think that the error is coming from attempts to serialize this class: class MirrorBundleIndexed : public std::map<MeshIndex, boost::shared_ptr<Mirror> > , public Object { public: typedef boost::shared_ptr<Mirror> valuetype; typedef std::map<MeshIndex,valuetype> container; typedef container::iterator iterator; typedef container::const_iterator const_iterator; ... private: friend class boost::serialization::access; template<class Archive> OPTX_LOCAL void serialize(Archive & ar, const unsigned int version){ ar & boost::serialization::base_object<Object>(*this); ar & boost::serialization::base_object<container>(*this); } }; Cheers JP
John Pye wrote:
Can anyone possibly clarify the cases when it is necessary to use "void_cast_register" with Boost::Serialization?
void_cast_register is invoked to register the relationship between a base class and derived class. Usually its automatic when a derived class serializes its base. When this doesn't occur, it has to be done explicitly. This is described in the manual. Robert Ramey
participants (2)
-
John Pye
-
Robert Ramey