From: Marek Polacek Date: Tue, 3 Jul 2018 14:25:38 +0000 (+0000) Subject: re PR c++/84306 (Wrong overload selected with -std=c++17, explicit and {}) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a9ad62b6990f9011d8edddbb615dfe3e7fadfb93;p=gcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9e6f966b9d5..a201b7e0251 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 00000000000..9d04a37fe5e --- /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}; +}