#ifndef GENERS_IOISCLASSTYPE_HH_ #define GENERS_IOISCLASSTYPE_HH_ namespace gs { template class IOIsClassType { typedef char One; typedef struct {char a[2];} Two; template static One test(int C::*); template static Two test(...); public: enum {value = sizeof(test(0)) == 1}; }; } #endif // GENERS_IOISCLASSTYPE_HH_