Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] Object reference tracking on instances bug?
From: r_at_[hidden]
Date: 2017-02-07 14:44:32


> It does serialize the first reference to the object correctly, but
> later objects just use the object_id_reference if they were similar
> to
> the first one (even if they contain different data!).  So the first
> color is serialized correctly.

The saving machinery kicks in at

     boost/archive/detail/oserializer.hpp

on line 510. That is where it selects, at compile time, wether the
object to serialize is a pointer, enum, "array", or regular non-pointer
type. In your case, I'm guessing it should always select the regular
non-pointer overload. You can add a breakpoint there and start your
debugger to see if it does the correct thing. Can you try that?

Regards,

Raoul


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