in th开发者_如何学编程e tutorial it is explained how to split load and save functions, but the boost_serialization_split_member() declaration was inside the class.
How do you declare a class being split to two functions externally?
The section of the docs labeled, "Splitting serialize into save/load" explains how to do this. Basically, you have two template functions, save
and load
, for the type in question, defined in the boost::serialization
namespace. Then you use the BOOST_SERIALIZATION_SPLIT_FREE
macro.
精彩评论