Boost deserialization of contained object fails when performed from a constructor, but succeeds otherwise.
E.G.:
ContainingClass::ContainingClass() {
pNA = new objectArray*[NUMBER]; // allocates ptrs
// ...
pNA[ii] = new objectArray(SIZE);// allocates object array, and object array
// has a std::map "PatternsMap"
// ...
pNA[ii]->load(pNA[ii], "../release/NA Data/NAData_a description_NA0"); //fails
pNA[ii]->PatternsMap.size(); //size = 0
}
If I call the following lines of code after the constructor exits then all is well:
pNA[ii]->load(pNA[ii], "../release/NA Data/NAData_a description_NA0"); //succeeds
pNA[ii]->PatternsMap.size();//size > 0
Any ideas? Note, that in the constructor example I verified that objectArray
was constructed first.