Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Serialization not building
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-10-14 13:51:16


OvermindDL1 wrote:
> On Wed, Oct 14, 2009 at 1:04 AM, OvermindDL1 <overminddl1_at_[hidden]>
> wrote:
>> /* snip */
>
>
> I also appear to have another error while trying to serialize a
> shared_ptr:
> I have spent about the last 4 hours changing one thing and changing
> another and nothing I do seems to ever work. And yes it happens with
> different archive types and so forth. I think I narrowed down the
> issue to line 42 in file
> boost\serialization\type_info_implementation.hpp but I am not certain,
> if it is not this line directly it is something that builds it up...
> Yes I do include the shared_ptr helper as the examples show
> (serialization\example\demo_shared_ptr.cpp), and tried various macros
> for registering it and so forth...

Does test_share_ptr included with the package compile and run with
your system? If not, I would like to hear about it. If so, check how
your application differs from the test.

> So any ideas why a non-virtual class/struct causes Boost.Serialization
> to choke in a shared_ptr (but works fine as a normal pointer), but a
> virtual one works?

This might be due to trying to serialize a non-polymorphic class
through a base class pointer. Of course without seeing the source
code, there's no way for anyone to know.

> Also, I noticed that the tr1 containers are not supported, such an
> unordered_set. I created my own serializer for those, but it seems
> odd that it is not included since it seems to contains everything else
> from the stl, and the tr1 containers have been in Boost for quite some
> time now.

No One has done it yet. Feel free to upload you version to the vault.

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