|
Boost Users : |
From: Martin Ecker (martin.ecker_at_[hidden])
Date: 2005-07-10 15:39:11
Hi,
Ivan Rachev wrote:
> If class A from the example is replaced by char, how should this
> situation be handled? Code follows at the end.
This is not recommended. Fundamental types are not tracked by default, so it
won't work. You'd have to turn on tracking for char, but that is not a good
idea, since then _all_ values of type char that are tracked, and this can cause
quite a bit of overhead.
If you really need a pointer that directly points into an array (and you can't
redesign the code), you could wrap the array elements in a different type that
can be tracked in your serialization code. All pointers into the array would
also need to be wrapped when serialized.
Regards,
Martin
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