PR c++/78840 - ICE with const and nested generic lambda

* g++.dg/cpp1y/lambda-generic-const5.C: New.

From-SVN: r251431
This commit is contained in:
Jason Merrill 2017-08-29 16:21:23 -04:00
parent 9925f216d0
commit 10f61650f7

View file

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