1 // PR c++/48744 2 // { dg-options "-std=c++0x" } 3 4 template<class T> 5 struct add_rval_ref { 6 typedef T&& type; 7 }; 8 9 template<> 10 struct add_rval_ref<void> { 11 typedef void type; 12 }; 13 14 template<class T> 15 typename add_rval_ref<T>::type create(); 16 17 template<class T, class Arg> 18 decltype(T{create<Arg>()}, char()) f(int); 19 20 template<class, class> 21 char (&f(...))[2]; 22 23 static_assert(sizeof(f<int, void>(0)) != 1, "Error"); 24