All pastes #244968 Raw Edit

EmmanueD

public cpp v1 · immutable
#244968 ·published 2006-11-10 13:09 UTC
rendered paste body
template <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);};