diff options
author | Marek Polacek <polacek@redhat.com> | 2021-04-29 13:30:39 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2021-04-29 13:31:08 -0400 |
commit | f24702258fc78ac37b3e8154d76239cccd30c422 (patch) | |
tree | 1e16b3e19a3dea700289db6f4d9b78c0d4b46ff5 | |
parent | fb9f5e1028df0fe6f2ff9d220efd75970e46bff0 (diff) | |
download | gcc-f24702258fc78ac37b3e8154d76239cccd30c422.zip gcc-f24702258fc78ac37b3e8154d76239cccd30c422.tar.gz gcc-f24702258fc78ac37b3e8154d76239cccd30c422.tar.bz2 |
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.
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1z/class-deduction87.C | 15 |
1 files changed, 15 insertions, 0 deletions
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 <typename _Tp> using decay_t = _Tp; +} +template <typename... B> struct Merged : B... { + template <typename... T> Merged(T... t) : B(t)... {} +}; +template <typename... T> Merged(T...) -> Merged<std::decay_t<T>...>; +int main() { + auto l1 = [] {}; + auto l2 = [](int i) { return i; }; + Merged(l1, l2); +} |