CnC
Serialization of simple structs/classes without pointers or virtual functions.
Serialization

If your struct does not contain pointers (nor virtual functions), instances of it may be serialized by simply copying them bytewise. In this case, it suffices to add your struct to the category bitwise_serializable which is done by providing the following global function:

           inline bitwise_serializable serializer_category( const Your_Class * ) {
               return bitwise_serializable();
           }

As a short-cut, you can just use CNC_BITWISE_SERIALIZABLE( T ) to declare your class as bitwise serializable:

       CNC_BITWISE_SERIALIZABLE( my_class );
 All Classes Namespaces Functions Variables Typedefs Enumerator Friends