re PR c++/63540 (Erroneous "'Derived' declares a move constructor or move assignment...
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 8 Mar 2019 21:22:07 +0000 (21:22 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 8 Mar 2019 21:22:07 +0000 (21:22 +0000)
2019-03-08  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/63540
* g++.dg/cpp0x/implicit17.C: New.

From-SVN: r269508

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/implicit17.C [new file with mode: 0644]

index f38eb2a..0b820ac 100644 (file)
@@ -1,5 +1,10 @@
 2019-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
 
+       PR c++/63540
+       * g++.dg/cpp0x/implicit17.C: New.
+
+2019-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
        PR c++/22149
        * g++.dg/template/access29.C: New.
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit17.C b/gcc/testsuite/g++.dg/cpp0x/implicit17.C
new file mode 100644 (file)
index 0000000..795bc4d
--- /dev/null
@@ -0,0 +1,18 @@
+// PR c++/63540
+// { dg-do compile { target c++11 } }
+
+template <typename T,
+         typename = decltype(*static_cast<T*>(0) = 0)> int break_it();
+template <typename> int break_it();
+
+struct Base {
+  Base(const Base &);
+  void operator=(Base &&);
+};
+
+struct Derived : Base {
+  using Base::operator=;
+};
+
+int a = break_it<Derived>();
+Derived v(v);