Boost logo

Boost Users :

Subject: [Boost-users] serialization: const char*
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-12-07 12:24:29


hello,

serializing a const char* is not allowed I gather?
char* seems not to be allowed either. primitive types pointers are not serializable?

I have a

struct S{
  double d;
  char c[SIZE];
  const char* x;
};

template <typename Archive>
void serialize(Archive& ar, S& s, const unsigned int version)
{
  ar & s.d;
  ar & s.c;
  ar & s.x;
}

the 3rd one seems to cause the compile error,

removing constness didn't help.

is one supposed to an array of char or a std::string instead

regards,


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net