Boost logo

Boost :

Subject: Re: [boost] [boost.Serialization V1.42.0] Question about BOOST_SERIALIZATION_SPLIT_FREE and non-public members
From: Stefan van Kessel (van_kessel_at_[hidden])
Date: 2010-08-05 20:03:43


I'm afraid declaring boost::serialization::access a friend is only
helpful if you choose the intrusive approach and your serialize member
function is not public. If you need the members to be non-public and a
"non-intrusive" approach, it seems you have to use a workaround like a
derived "accessor class" that exposes the private members. See
http://stackoverflow.com/questions/1687579/boost-serialization-access-to-protected-data
for an example.

Have a nice day,
Stefan


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