Index: g++.dg/cpp0x/sfinae21.C =================================================================== --- g++.dg/cpp0x/sfinae21.C (revision 0) +++ g++.dg/cpp0x/sfinae21.C (revision 0) @@ -0,0 +1,14 @@ +// PR c++/48735 +// { dg-options "-std=c++0x" } + +template +char f(int); + +template +char (&f(...))[2]; + +struct ND { ND() = delete; }; + +static_assert(sizeof(f(0)) != 1, "Error"); Index: g++.dg/template/sfinae28.C =================================================================== --- g++.dg/template/sfinae28.C (revision 173596) +++ g++.dg/template/sfinae28.C (working copy) @@ -1,13 +0,0 @@ -// PR c++/48737 -// { dg-options "-std=c++0x" } - -template -T&& create(); - -template -decltype(T{create()...}, char()) f(int); - -template -char (&f(...))[2]; - -static_assert(sizeof(f(0)) != 1, "Error"); Index: g++.dg/template/sfinae29.C =================================================================== --- g++.dg/template/sfinae29.C (revision 173596) +++ g++.dg/template/sfinae29.C (working copy) @@ -1,23 +0,0 @@ -// PR c++/48744 -// { dg-options "-std=c++0x" } - -template -struct add_rval_ref { - typedef T&& type; -}; - -template<> -struct add_rval_ref { - typedef void type; -}; - -template -typename add_rval_ref::type create(); - -template -decltype(T{create()}, char()) f(int); - -template -char (&f(...))[2]; - -static_assert(sizeof(f(0)) != 1, "Error");