开发者

how to state boost_serialization_split_member for non-intrusive function definitions

开发者 https://www.devze.com 2023-03-24 09:04 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消