File indexing completed on 2024-04-06 11:56:19
0001 #ifndef GENERS_IOISCLASSTYPE_HH_
0002 #define GENERS_IOISCLASSTYPE_HH_
0003
0004 namespace gs {
0005 template <typename T>
0006 class IOIsClassType {
0007 typedef char One;
0008 typedef struct {
0009 char a[2];
0010 } Two;
0011 template <typename C>
0012 static One test(int C::*);
0013 template <typename C>
0014 static Two test(...);
0015
0016 public:
0017 enum { value = sizeof(IOIsClassType<T>::template test<T>(nullptr)) == 1 };
0018 };
0019 }
0020
0021 #endif