
Am 30.03.2013 19:03, schrieb Robert Ramey:
is there a solution to this? is there a serialization wrapper that says "don't track this type just because of this pointer"?
so you want "don't track this particular save - but leave others as normal"
Try something like
class A ....
class UntrackedA : public A { ... };
BOOST_SERIALIZATION_TRACK(UntrackedA, track_never);
interesting idea. does this eventually track the object if the base class of UntrackedA is track_selectively and saved through a pointer anywhere else? for example, an object graph that stores a pointer to its own root (through intermediaries in practice): class A{ //tracking level: selectively void serialize(...){ ar & a; } A *a; //==this }; class UntrackedA : A{ //tracking level: never void serialize(...){ ar & base_object<A>(*this); } } void save(UntrackedA *a){ ar << a; } is "a" serialized twice, or tracked because of track_selectively and the pointer serialization in A::serialize?