agrosjea wrote:
Hello.
I'm currently trying to integrate the boost::serialization lib into my project and I encounter some problems :
- With the non intrusive version I just cannot get my derivated class to serialize properly. I'm getting the "Invalid XML tag name" error (see http://codepad.org/EYHfWxqN http://codepad.org/EYHfWxqN for a short code sample )
- Still with the non intrusive version, I really don't want to break my encapsulation with public attributes. So I wonder if I could use friend instead, but friend of what ?? (friend class boost::serialization::access doesnt seems to work)
Thx for your help.
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)); Hope this is gonna help someone... -- View this message in context: http://old.nabble.com/-Boost-serialization--non-intrusive---derivated-class-... Sent from the Boost - Users mailing list archive at Nabble.com.