1 // PR c++/48581 2 // { dg-do compile { target c++11 } } 3 4 template<class T> 5 T&& create(); 6 7 template<class T, 8 class = decltype(foo(create<T>())) 9 > 10 auto f(int) -> char; 11 12 template<class> 13 auto f(...) -> char (&)[2]; 14 15 struct S {}; 16 void foo(S); 17 18 static_assert(sizeof(f<S>(0)) == 1, "Error"); // (#) 19 main()20int main() {} 21