gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic20.C
raw| 1 | // PR c++/90448 |
| 2 | // { dg-do compile { target c++14 } } |
| 3 | |
| 4 | template<class ... Ts> int fooV(Ts ... ts) { |
| 5 | auto L = [](auto ... a) { |
| 6 | auto M = [](decltype(a) ... b) -> void { |
| 7 | }; |
| 8 | return M; |
| 9 | }; |
| 10 | |
| 11 | decltype(L(L, ts...)) (*fp)(decltype(L), decltype(ts) ...) = L; |
| 12 | |
| 13 | return 0; |
| 14 | } |
| 15 | |
| 16 | int run2 = fooV("BC", 3, 2.77, 'A', float{}, short{}, unsigned{}); |