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.
This commit is contained in:
parent
fb9f5e1028
commit
f24702258f
15
gcc/testsuite/g++.dg/cpp1z/class-deduction87.C
Normal file
15
gcc/testsuite/g++.dg/cpp1z/class-deduction87.C
Normal file
@ -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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user