Skip to content

Request: Please provide an example that packs and unpacks a derived class #20

@quazar0

Description

@quazar0

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions