...but for Codeplay, an empty class *always* gives 4 byte pointers. If compiled with the /clr option ("managed C++"), the JIT compiler thinks it needs to load GenericClass before it can call any of its functions, (compiles OK but crashes at runtime!), so we need to declare an empty class to make it happy. Codeplay and VC4 can't cope with the unknown_inheritance case either.

Nasty hack for Microsoft and Intel (IA32 and Itanium) unknown_inheritance classes go here This is probably the ugliest bit of code I've ever written. Look at the casts! There is a compiler bug in MSVC6 which prevents it from using this code.