Boost logo

Boost Users :

Subject: [Boost-users] [serialization] Serializing const* to serialized data
From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2009-11-05 19:08:03


Consider something like so:

struct A
{
  ...?
};

struct B
{
  std::list<A> items;
};

struct C
{
  A const* ptr_to_item_in_B_items;
};

Serializing B is easy.

Serialization of C ... not so much. The naive approach did not work
because it wants a non-const pointer. Having read posts about the
problem it seems the serialization library expects to modify the data
pointed to, but I don't need or want that...I just want to recover the
structure layout.

Possible? Impossible?


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