Classdesc will work with any syntactically correct C++ code, and
attempt to do the best it can. It ignores anything that is not a
struct/class definition, or an enum definition. Classdesc
does not preprocess the code presented to it -- if you depend on the
preprocessor in your class definitions, you must filter your code
through the preprocessor first,4 defining the macro
_CLASSDESC to ensure pragmas are seen by the
Classdesc processor.
Unfortunately, overloaded member functions cannot be
resolved to a distinct member pointer, so are quietly ignored by
classdesc. This is not an issue with serialisation, of course, as all
member functions are ignored, but has implications for actions such as
TCL_obj that export object functionality.
Raw pointers also cause problems in that there is no information at runtime about how many objects a pointer points to, or whether it is reasonable to extend the array with memory taken from the heap. Support for the various uses of pointers is discussed in §13.2.1.