From a9ad62b6990f9011d8edddbb615dfe3e7fadfb93 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Tue, 3 Jul 2018 14:25:38 +0000 Subject: [PATCH] re PR c++/84306 (Wrong overload selected with -std=c++17, explicit and {}) PR c++/84306 * g++.dg/overload/conv-op3.C: New test. From-SVN: r262345 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/overload/conv-op3.C | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/g++.dg/overload/conv-op3.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9e6f966..a201b7e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -3,6 +3,9 @@ PR middle-end/86202 * gcc.dg/Wint-conversion-2.c: New test. + PR c++/84306 + * g++.dg/overload/conv-op3.C: New test. + 2018-07-03 Richard Biener PR ipa/86389 diff --git a/gcc/testsuite/g++.dg/overload/conv-op3.C b/gcc/testsuite/g++.dg/overload/conv-op3.C new file mode 100644 index 0000000..9d04a37 --- /dev/null +++ b/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 + explicit foo(T&&) { } +}; + +int +main() +{ + foo f1; + foo f2{f1}; +} -- 2.7.4