3 // It's not clear whether this is well-formed; instantiating the
4 // initializer of 'value' causes the instantiation of Derived, which in
5 // turn requires the value of 'value', but the recursion ends there, so it
6 // seems reasonable to allow it.
8 template <typename T> struct Test {
9 template<typename X> static int check(typename X::Type*);
10 template<typename> static char check(...);
11 static const bool value = (sizeof(check<T>(0)) == sizeof(int));
13 template <int> struct Sink { };
14 template <typename T> struct Derived : Sink<Test<Derived<T> >::value> {
18 Sink<Test<Derived<int> >::value> s;