template class has_sub_type { typedef size_1 char[1]; typedef size_2 char[2]; template class wrapper { }; template static size_1& test(wrapper*); template static size_2& test(...); public: static const bool value = (sizeof(test(0)) == 1); };