rutz::is_polymorphic_imp1< T > Struct Template Reference

Helper struct for telling whether T is a polymorphic type or not. More...

#include <rutz/traits.h>

List of all members.

Classes

struct  d1
struct  d2

Public Types

enum  { value = (sizeof(d2) == sizeof(d1)) }
typedef T ncvT

Detailed Description

template<class T>
struct rutz::is_polymorphic_imp1< T >

Helper struct for telling whether T is a polymorphic type or not.

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.


The documentation for this struct was generated from the following file:
Generated on Sun May 8 08:31:21 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3