Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/lambda/lambda-array4.C

raw
1 // PR c++/106567
2 // { dg-do compile { target c++11 } }
3
4 template <class V>
5 void urgh()
6 {
7 const V x[] = {V(0), V(1), V(2), V(0)};
8
9 [&]() {
10 for (auto& v : x) {}
11 }();
12 }
13
14 void no_urgh()
15 {
16 using V = int;
17
18 const V x[] = {V(0), V(1), V(2), V(0)};
19
20 [&]() {
21 for (auto& v : x) {}
22 }();
23 }
24
25 int main()
26 {
27 no_urgh();
28 urgh<int>();
29 }