From f24702258fc78ac37b3e8154d76239cccd30c422 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Thu, 29 Apr 2021 13:30:39 -0400 Subject: c++: Add testcase for already fixed PR [PR94102] We correctly accept this testcase since r11-1571. gcc/testsuite/ChangeLog: PR c++/94102 * g++.dg/cpp1z/class-deduction87.C: New test. --- gcc/testsuite/g++.dg/cpp1z/class-deduction87.C | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1z/class-deduction87.C (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction87.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction87.C new file mode 100644 index 0000000..37296a4 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction87.C @@ -0,0 +1,15 @@ +// PR c++/94102 +// { dg-do compile { target c++17 } } + +namespace std { + template using decay_t = _Tp; +} +template struct Merged : B... { + template Merged(T... t) : B(t)... {} +}; +template Merged(T...) -> Merged...>; +int main() { + auto l1 = [] {}; + auto l2 = [](int i) { return i; }; + Merged(l1, l2); +} -- cgit v1.1