Debian Codegraph @

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

raw
1 // PR c++/96311
2 // { dg-do compile { target c++14 } }
3 // { dg-additional-options -Wunused }
4
5 auto foo()
6 {
7 constexpr int used = 0;
8 return
9 [](auto unused)
10 {
11 return used;
12 };
13 }
14
15 int main()
16 {
17 foo()(42);
18 }