Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic21.C

raw
1 // PR c++/91104
2 // { dg-do run { target c++14 } }
3
4 void
5 test (void (*f)(int, int, int))
6 {
7 f(1, 2, 3);
8 }
9
10 void
11 check (int a, int b, int c)
12 {
13 if (a != 1 || b != 2 || c != 3)
14 __builtin_abort ();
15 }
16
17 int
18 main ()
19 {
20 test ([](auto... args) {
21 check (args...);
22 });
23 test ([](int a, int b, int c) {
24 check (a, b, c);
25 });
26 }