// PR c++/78840 // { dg-do compile { target c++14 } } int global; void Bar (int); template void Foo () { const int cst = global; auto lam0 = [&]() -> void { auto lam1 = [&]() -> void { cst; }; Bar (cst); }; } template void Foo <0> ();