repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git]
/
main
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
lambda
/
lambda-array.C
blob
adb40ed6b719166951979d037fc098e1dab2091d
1
// Test that array capture by copy works.
2
// { dg-do run { target c++11 } }
3
4
struct A
5
{
6
int i;
7
A(int i): i(i) {}
8
A(const A& a): i(a.i+1) {}
9
};
10
11
int main()
12
{
13
A ar[4][3] = { { 10, 20, 30 },
14
{ 40, 50, 60 },
15
{ 70, 80, 90 },
16
{ 100, 110, 120 } };
17
int i = [ar] { return ar[1][1]; }().i;
18
return (i!= 52);
19
}