Commit 10f61650 by Jason Merrill

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

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

From-SVN: r251431
parent 9925f216
// 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> ();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment