This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH to add a test for c++/84306


This patch merely adds a test for an already fixed issue.

Tested on x86_64-linux, ok for trunk?

2018-07-03  Marek Polacek  <polacek@redhat.com>

	PR c++/84306
	* g++.dg/overload/conv-op3.C: New test.

diff --git gcc/testsuite/g++.dg/overload/conv-op3.C gcc/testsuite/g++.dg/overload/conv-op3.C
index e69de29bb2d..9d04a37fe5e 100644
--- gcc/testsuite/g++.dg/overload/conv-op3.C
+++ gcc/testsuite/g++.dg/overload/conv-op3.C
@@ -0,0 +1,18 @@
+// c++/84306
+// { dg-do link { target c++11 } }
+
+struct foo {
+  foo() = default;
+
+  foo(foo const&);
+
+  template<typename T>
+  explicit foo(T&&) { }
+};
+
+int
+main()
+{
+  foo f1;
+  foo f2{f1};
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]