【发布时间】:2014-04-23 01:28:53
【问题描述】:
当对象包含时如何使用 boost (c++11) 序列化/反序列化对象
vector<map<u_int64_t, Student*>*>* students;
喜欢:
class YearContainer{
public:
vector<map<u_int64_t, Student*>*>* students;
};
Student 类有序列化方法,如
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & name;
// ....
}
如何反序列化并在堆上创建所有内容?
【问题讨论】: