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 f38eb2a5aa783c873cb3b23dc3b853fa1ff53ed2..0b820ac00bd14aaca2ffecfb442ff5d7a6706bf9 100644 (file)
@@ -1,3 +1,8 @@
+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
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);