From fbf3e66ffc72fe977d916c686bcb3a2919d83f03 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 2 Jan 2019 22:39:16 +0000 Subject: [PATCH] PR c++/81486 - CTAD failing with (). * g++.dg/cpp1z/class-deduction60.C: New test. * g++.dg/cpp1z/class-deduction61.C: New test. From-SVN: r267535 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/cpp1z/class-deduction60.C | 19 +++++++++++++++++++ gcc/testsuite/g++.dg/cpp1z/class-deduction61.C | 15 +++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1z/class-deduction60.C create mode 100644 gcc/testsuite/g++.dg/cpp1z/class-deduction61.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b4cf178..a7e0e1b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -6,6 +6,10 @@ PR c++/88631 - CTAD failing for value-initialization. * g++.dg/cpp1z/class-deduction59.C: New test. + PR c++/81486 - CTAD failing with (). + * g++.dg/cpp1z/class-deduction60.C: New test. + * g++.dg/cpp1z/class-deduction61.C: New test. + 2019-01-02 Martin Sebor Jeff Law diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction60.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction60.C new file mode 100644 index 0000000..dbc5732 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction60.C @@ -0,0 +1,19 @@ +// PR c++/81486 +// { dg-do compile { target c++17 } } + +template +struct C { + C(T); +}; + +template <> +struct C { }; + +C() -> C; + +int +main() +{ + auto a = C{}; + auto b = C(); +} diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction61.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction61.C new file mode 100644 index 0000000..9ef095e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction61.C @@ -0,0 +1,15 @@ +// PR c++/81486 +// { dg-do compile { target c++17 } } + +template +struct foo +{ + template + foo(Us...) { } +}; + +int +main () +{ + auto f = foo(); +} -- 2.7.4