From: Paolo Carlini Date: Mon, 9 May 2011 22:57:19 +0000 (+0000) Subject: re PR c++/48735 ([C++0x][SFINAE] Hard errors with array list-construction and deleted... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=65dbe23923efe97ac7edaa04fccacdb722a4a400;p=gcc.git re PR c++/48735 ([C++0x][SFINAE] Hard errors with array list-construction and deleted default c'tor) 2011-05-09 Paolo Carlini PR c++/48735 * g++.dg/cpp0x/sfinae21.C: New. 2011-05-09 Paolo Carlini * g++.dg/template/sfinae28.C: Rename to... * g++.dg/cpp0x/sfinae19.C: ... this. * g++.dg/template/sfinae29.C: Rename to... * g++.dg/cpp0x/sfinae20.C: ... this. From-SVN: r173597 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0b9b1192279..8279c6998b3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2011-05-09 Paolo Carlini + + PR c++/48735 + * g++.dg/cpp0x/sfinae21.C: New. + +2011-05-09 Paolo Carlini + + * g++.dg/template/sfinae28.C: Rename to... + * g++.dg/cpp0x/sfinae19.C: ... this. + * g++.dg/template/sfinae29.C: Rename to... + * g++.dg/cpp0x/sfinae20.C: ... this. + 2011-05-09 Jeff Law * lib/gcc-gdb-test.exp (gdb-test): Reorder matchers to give more diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae19.C b/gcc/testsuite/g++.dg/cpp0x/sfinae19.C new file mode 100644 index 00000000000..be96983bf39 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/sfinae19.C @@ -0,0 +1,13 @@ +// 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"); diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae20.C b/gcc/testsuite/g++.dg/cpp0x/sfinae20.C new file mode 100644 index 00000000000..486064c3af7 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/sfinae20.C @@ -0,0 +1,23 @@ +// 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"); diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae21.C b/gcc/testsuite/g++.dg/cpp0x/sfinae21.C new file mode 100644 index 00000000000..4fba6eb82a1 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/sfinae21.C @@ -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"); diff --git a/gcc/testsuite/g++.dg/template/sfinae28.C b/gcc/testsuite/g++.dg/template/sfinae28.C deleted file mode 100644 index be96983bf39..00000000000 --- a/gcc/testsuite/g++.dg/template/sfinae28.C +++ /dev/null @@ -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"); diff --git a/gcc/testsuite/g++.dg/template/sfinae29.C b/gcc/testsuite/g++.dg/template/sfinae29.C deleted file mode 100644 index 486064c3af7..00000000000 --- a/gcc/testsuite/g++.dg/template/sfinae29.C +++ /dev/null @@ -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");