template<typename T>
class is_class {
typedef char yes[1];
typedef char no [2];
template<typename C> static yes& test(int C::*); // selected if C is a class type
template<typename C> static no& test(...); // selected otherwise
public:
static bool const value = sizeof(test<T>(0)) == sizeof(yes);
};
c++ 고인물 언어 인정합니까
C::* 는 또 머고
... 는 variadic 말고 이렇게 쓰는 건 또...
Usage: is_class<int>::value