在编绎BOOST::Serialization 例子的时候,遇到的错误.
// if your program traps here, it indicates taht your doing one of the following:
// a) serializing an object of a type marked "track_never" through a pointer.
// b) saving an non-const object of a type not markd "track_never)
// Either of these conditions may be an indicator of an error usage of the
// serialization library and should be double checked. See documentation on
// object tracking.
解决:
class MyClass{...};
BOOST_CLASS_TRACKING(MyClass, boost::serialization::track_never)

本文解决了在使用BOOST::Serialization库时遇到的一个常见错误。该错误通常发生在尝试序列化被标记为track_never的对象时,文章提供了具体的解决办法,并强调了检查对象跟踪的重要性。
556

被折叠的 条评论
为什么被折叠?



