EmmanueD
public cpp v1 · immutabletemplate <class T> class has_sub_type{ typedef size_1 char[1]; typedef size_2 char[2]; template <class wrapped> class wrapper { }; template <u> static size_1& test(wrapper<typename u::type>*); template <u> static size_2& test(...);public: static const bool value = (sizeof(test<T>(0)) == 1);};