7 Feb
2017
7 Feb
'17
2:44 p.m.
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