Boost logo

Boost :

Subject: Re: [boost] [serialization] polymorphic archives runtime failure (was:polymorphic archives ... generates linker errors)
From: Christoph Heindl (christoph.heindl_at_[hidden])
Date: 2009-12-02 02:31:50


On Tue, Dec 1, 2009 at 10:20 PM, Robert Ramey <ramey_at_[hidden]> wrote:
>
> try using another archive rather than polymorphic_archive.

Are you suggesting to drop polymorphic archive support?

>
> try using it with xml_archive (if you have name tags) to display the
> archive.

I did this. The output looks ok. Here it is:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="5">
<a class_id="1" class_name="B" tracking_level="1" version="0" object_id="_0">
        <A class_id="0" tracking_level="1" version="0" object_id="_1">
                <i>3</i>
        </A>
</a>
</boost_serialization>

There is no difference in saving using xml_oarchive and
polymorphic_xml_oarchive. It fails on loading the type 'B', when using
polymorphic_xml_iarchive, which according to the library is an
'unregistered class'.

Best regards,
Christoph


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk