#include <rutz/traits.h>
Public Types | |
enum | { value = (sizeof(d2) == sizeof(d1)) } |
typedef T | ncvT |
Classes | |
struct | d1 |
struct | d2 |
The implementation trick here is that, if T is NOT polymorphic, then if we derive a new type from T that has virtual functions, then its sizeof() should increase to make room for the vtable pointer. On the other hand, if T is already polymorphic, then it already has a vtable ptr and so adding a new virtual function won't change sizeof() the derived type.
Definition at line 135 of file traits.h.