1 // PR c++/39070 2 // { dg-do compile { target c++11 } } 3 4 template<typename X> struct junk { 5 template<typename Z> static Z y(); 6 template<typename Y> static int test(...); 7 template<typename Y> static char test(decltype(y<Y>())*); 8 static int const value=sizeof(test<X>(0)); 9 }; 10 typedef char type[junk<int>::value==sizeof(char) ? 1 : -1]; 11