Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2007-03-29 01:48:44


Sohail Somani wrote:

> Thanks for your suggestion. It seems the class_id's are reversed and
> that tracking_level=0! Is that a clue? Wieeeeeerd!
>
> XML output:
>
>> From gcc 3.2:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
> <!DOCTYPE boost_serialization>
> <boost_serialization signature="serialization::archive" version="3">
> <b class_id="0" tracking_level="0" version="1">
> <px class_id="2" class_name="derived" tracking_level="1"
> version="0" object_id="_0">
> <base class_id="1" tracking_level="1" version="0"
> object_id="_1"></base>
> <id_>derived id</id_>
> </px>
> </b>
> </boost_serialization>
>
>> From Visual C++ 7.1:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
> <!DOCTYPE boost_serialization>
> <boost_serialization signature="serialization::archive" version="3">
> <b class_id="0" tracking_level="0" version="1">
> <px class_id="1" class_name="derived" tracking_level="1"
> version="0" object_id="_0">
> <base class_id="2" tracking_level="0"
> version="0"></base>
> <id_>derived id</id_>
> </px>
> </b>
> </boost_serialization>

shared_ptr addresses are not tracked since one isn't serializing a
pointer to a shared_ptr. So this is OK.

What I see is that on the gcc output, we're "skipping" a class id.
This is not what I expect to see. I looked into the code
basic_oarchive.cpp where classes are tracked. I suspect
this would be tracked down to something in the extended_type_info
registry which isn't properly keeping track. Basically one
would have to dive in with the debugger with your test.

Robert Ramey


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