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:
Marek Polacek 2021-04-29 13:30:39 -04:00
parent fb9f5e1028
commit f24702258f

View 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);
}