Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost serialization] non intrusive & derivated class
From: agrosjea (arnaud.grosjean_at_[hidden])
Date: 2010-06-24 05:58:17


BOOST_SERIALIZATION_BASE_OBJECT_NVP isnt working in a non intrusive case,
since the macro uses this.

Steven Watanabe-4 wrote:
>
> AMDG
>
> agrosjea wrote:
>> I found the problem in my code, the BOOST_SERIALIZATION_NVP macro doesnt
>> seems to support the derivated classes. so I used
>> boost::serialization::make_nvp(....) instead
>>
>> it replaces
>> ar <<
>> BOOST_SERIALIZATION_NVP(boost::serialization::base_object<Father>(g));
>> by
>> ar << boost::serialization::make_nvp("son",
>> boost::serialization::base_object<Father>(g));
>>
>
> You could also use BOOST_SERIALIZATION_BASE_OBJECT_NVP
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>

-- 
View this message in context: http://old.nabble.com/-Boost-serialization--non-intrusive---derivated-class-tp28958229p28980838.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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