22 Jun
2010
22 Jun
'10
4:15 p.m.
The intended way to deal with is is use class Father { friend class boost::serialization::acess; ... }; agrosjea wrote:
I actually found a way to use friendship in my sample code. It looks like
class Father{ protected : string who; template<class Archive> friend void serialize(Archive& , Father&, const unsigned int); public : Father(){ who = "father";}; virtual void whoAreYou(){ cout << "Hello, I am the " << this->who << endl; }; };
Seems to work but is it the cleanest way to make it ?