c++: Add test for c++/91104
Fixed by r271705. gcc/testsuite/ChangeLog: PR c++/91104 * g++.dg/cpp1y/lambda-generic-variadic21.C: New test.
This commit is contained in:
parent
77d455ee81
commit
08ca2d744d
1 changed files with 26 additions and 0 deletions
26
gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic21.C
Normal file
26
gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic21.C
Normal file
|
@ -0,0 +1,26 @@
|
|||
// PR c++/91104
|
||||
// { dg-do run { target c++14 } }
|
||||
|
||||
void
|
||||
test (void (*f)(int, int, int))
|
||||
{
|
||||
f(1, 2, 3);
|
||||
}
|
||||
|
||||
void
|
||||
check (int a, int b, int c)
|
||||
{
|
||||
if (a != 1 || b != 2 || c != 3)
|
||||
__builtin_abort ();
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
test ([](auto... args) {
|
||||
check (args...);
|
||||
});
|
||||
test ([](int a, int b, int c) {
|
||||
check (a, b, c);
|
||||
});
|
||||
}
|
Loading…
Add table
Reference in a new issue