Debian Codegraph @

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

raw
1 // PR c++/79640
2 // { dg-do compile { target c++14 } }
3
4 template<typename F> void foo(F f)
5 {
6 f(1);
7 }
8
9 template<int> void bar()
10 {
11 const int i = i;
12 foo([] (auto) { sizeof(i); });
13 }
14
15 void baz() { bar<1>(); }