/cp
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / pr83739.C
blob4761220c057c096981ccc1392b085d61c8d7b252
1 // { dg-do compile { target c++14 } }
3 // PR 83739, deduced range-for in lambda in template
5 template <bool> void f()
7   int x[2];
8   auto delegate = [](auto & foo)
9   {
10     for (auto bar : foo);
11   };
12   delegate(x);
14 int main() {
15   f<true>();