class workflow {
private:
friend class boost::serialization::access;
template
void serialize(Archive & ar, const unsigned int version)
{
ar
In case someone will ever need to write explicit 'serialize' method without any includes of boost headers (for abstract purposes, etc):
std::vector dataVec;
int size; //you have explicitly add vector size
template
void serialize(Archive &ar, const unsigned int version)
{
if(Archive::is_loading::value) {
ar & size;
for(int i = 0; i < size; i++) {
Data dat;
ar & dat;
dataVec.push_back(dat);
}
} else {
size = dataVec.size();
ar & size;
for(int i = 0; i < size; i++) {
ar & dataVec[i];
}
}
}