2 // { dg-do compile { target c++11 } }
14 template<class T, class = typename T::type>
18 auto f(...) -> char (&)[2];
20 static_assert(sizeof(f<C>(0)) == 2, "Ouch");
22 typedef int testf[sizeof(f<C>(0)) == 2 ? 1 : -1];
24 I<sizeof(f<C>(0))> vf;
27 auto g(int) -> decltype(typename T::type(), char());
30 auto g(...) -> char (&)[2];
32 static_assert(sizeof(g<C>(0)) == 2, "Ouch");
34 typedef int testg[sizeof(g<C>(0)) == 2 ? 1 : -1];
36 I<sizeof(g<C>(0))> vg;