
Hi! Dominick Layfield schrieb:
What on earth does it actually mean to serialize a pointer? And why would I want to do such a thing, anyway?
I use the serialization of "pointers" in one of my apps: I have a class hierachy where some classes are "containers" and store "shared_ptr"s to a set of objects (base class pointers, runtime polymorphism). This builds up a object hierachy at runtime. Apart from that there is a map which references some of these objects in the hierachy. If there wasn't object tracking, I'd be lost with determinig the actual runtime type of objects and the restauration of multiple pointers to the same object. In my opinion if you do not know what serializing a pointer in boost means then you have not carefully read the tutorial. See http://www.boost.org/libs/serialization/doc/tutorial.html#pointers for details. Of course this does not clear the general point "what are sensible semantics for serialization of pointer?", but I like the boost solution in this regard. Best Regards, Frank