re PR c++/48735 ([C++0x][SFINAE] Hard errors with array list-construction and deleted...
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 9 May 2011 22:57:19 +0000 (22:57 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 9 May 2011 22:57:19 +0000 (22:57 +0000)
2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/48735
* g++.dg/cpp0x/sfinae21.C: New.

2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>

* 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

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/sfinae19.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/sfinae20.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/sfinae21.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/sfinae28.C [deleted file]
gcc/testsuite/g++.dg/template/sfinae29.C [deleted file]

index 0b9b11922793c323330b6cf862820d8697a60caf..8279c6998b3a8da82652aa56e27c741ff595222d 100644 (file)
@@ -1,3 +1,15 @@
+2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/48735
+       * g++.dg/cpp0x/sfinae21.C: New.
+
+2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * 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 <law@redhat.com>
 
        * 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 (file)
index 0000000..be96983
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/48737
+// { dg-options "-std=c++0x" }
+
+template<class T>
+T&& create();
+
+template<class T, class... Args>
+decltype(T{create<Args>()...}, char()) f(int);
+
+template<class, class...>
+char (&f(...))[2];
+
+static_assert(sizeof(f<int[1], int, int>(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 (file)
index 0000000..486064c
--- /dev/null
@@ -0,0 +1,23 @@
+// PR c++/48744
+// { dg-options "-std=c++0x" }
+
+template<class T>
+struct add_rval_ref {
+  typedef T&& type;
+};
+
+template<>
+struct add_rval_ref<void> {
+  typedef void type;
+};
+
+template<class T>
+typename add_rval_ref<T>::type create();
+
+template<class T, class Arg>
+decltype(T{create<Arg>()}, char()) f(int);
+
+template<class, class>
+char (&f(...))[2];
+
+static_assert(sizeof(f<int, void>(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 (file)
index 0000000..4fba6eb
--- /dev/null
@@ -0,0 +1,14 @@
+// PR c++/48735
+// { dg-options "-std=c++0x" }
+
+template<class T, 
+ class = decltype(T{})
+>
+char f(int);
+
+template<class>
+char (&f(...))[2];
+
+struct ND { ND() = delete; };
+
+static_assert(sizeof(f<ND[1]>(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 (file)
index be96983..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// PR c++/48737
-// { dg-options "-std=c++0x" }
-
-template<class T>
-T&& create();
-
-template<class T, class... Args>
-decltype(T{create<Args>()...}, char()) f(int);
-
-template<class, class...>
-char (&f(...))[2];
-
-static_assert(sizeof(f<int[1], int, int>(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 (file)
index 486064c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// PR c++/48744
-// { dg-options "-std=c++0x" }
-
-template<class T>
-struct add_rval_ref {
-  typedef T&& type;
-};
-
-template<>
-struct add_rval_ref<void> {
-  typedef void type;
-};
-
-template<class T>
-typename add_rval_ref<T>::type create();
-
-template<class T, class Arg>
-decltype(T{create<Arg>()}, char()) f(int);
-
-template<class, class>
-char (&f(...))[2];
-
-static_assert(sizeof(f<int, void>(0)) != 1, "Error");