Marco Meoni - Sbaush wrote:
> I've tried to serialize all the structure with "ar & *this;" inside
> serialize function.
 
Don't do this.
 
Robert Ramey
 

>
>
> I've obtained a stack overflow.
> Unhandled exception at 0x004660b9 in example.exe: 0xC00000FD: Stack
> overflow.
>
>
> Have you idea how can i serialize all my object?
>
>
>
>
>
>
> On Thu, Apr 29, 2010 at 11:08 AM, Marco Meoni - Sbaush
> <sbaush@gmail.com> wrote:
>
> I obtain this error:
> c:\boost\boost_1_42\boost\serialization\access.hpp(118) : error
> C2039: 'serialize' : is not a member of 'Container' 
>
>
> I can overcome the problem by defining the serialize method inside
> container. But container is an external library, so i can't modify
> it. I would serialize the entire contents of Example without touching
> the others structures. I thought that smart pointers could be the
> right solution for me. What i shoud do instead in your opinion?   
>
>
> thanks.
>
>
> Marco.
>
>
> On Wed, Apr 28, 2010 at 11:19 PM, Robert Ramey <ramey@rrsd.com> wrote:
>
> Marco Meoni - Sbaush wrote:
>> struct Example{
>> friend class boost::serialization::access;
>>         template<class Archive>
>>         void serialize(Archive & ar, const unsigned int /*
>> file_version */){
>           ar & results_container; // INCLUDE THIS
>
>> }
>>         Container* results_container;
>> MyMap this_is_a_map;
>>         Example(){}
>>         ...
>>         ...
>> };
>
> Try specifying which members you want to serialize in the serialize
> function.  See above.
>
> Robert Ramey
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users@lists.boost.org
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
>
> --
> Marco Meoni - Sbaush
> www.marcomeoni.net