
12 Aug
2009
12 Aug
'09
2:46 p.m.
Soumen wrote: [snip]
D::cleanup(); D *dObj = D::instance(); iparchive >> (*dObj);
[snip] I am also trying to do serialization of singletons (see post regarding serialization and error category). Have you considered using the stuff available for "non-default constructors" (see doc) for loading? E.g., template<class Archive> inline void load_construct_data( Archive & ar, D * dObj, const unsigned int file_version ){ dObj = D::instance(); } Cheers, Rutger