Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-04-23 02:06:54

Hmm - what was wrong with the archive being smaller than you wanted? Since
your argument is const, it should be the same value.

dereferencing is not the same as serialization the pointer. In the second
case a new object will be created when serialized. I would be surprised if
dereferencing eliminated the copy.

Finally, if you really want to write mulltiple copies of the same the item,
the best way would be to mark objects of this type as "track_never"

Robert Ramey

Darren Cook wrote:
> Hi,
> Can I suggest adding another example to:
> I had this code:
> void mycallback(const BigClass &BC){
> const SomeData *d=BC.get_data();
> ...
> }
> My archive was smaller than intended and I discovered that the data
> only
> got saved the first time. XML version showed me it was using:
> object_id_reference.
> It turns out the fix was to dereference the pointer:
> That is an easy to write bug; I cannot see how the serialization
> library
> can catch it, so all I can think of is to make people aware of it in
> the docs. Also please mention "object_id_reference" in the
> objecttracking
> section of the docs, as that was the first thing I googled on and it
> got
> no useful hits.
> Darren
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at