Boost logo

Boost Users :

From: Joseph Turian (turian_at_[hidden])
Date: 2006-01-16 15:33:13


If see from the serialization documentation that if I serialize a
pointer more than once, only one instance will appear in the archive.

However, what about static member variables?
Will they only be serialized once, even if I serialize multiple
objects of the class type?


class foo {
   int i;
   static int j;

   friend class boost::serialization::access;
   template<class Archive> void serialize(Archive& ar, const unsigned
int version) {
      ar & i;
      ar & j; // Will j be serialized multiple times, i.e. once per
foo instance?




Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at