Could you please add an example that will pack and unpack a derived class, similar to this class C (which is derived from class P).
And include the proper pack() method in each class.
class C: public P
{
public:
string sName;
template< class T >
void pack( T &pack ) {
pack( sName, ??? );
}
}
class P
{
public:
int uid;
template< class T >
void pack( T &pack ) {
pack( uid );
}
}
And maybe more importantly, the example should include an example where class C is derived from a std class (e.g. std::map).
Thank you.