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
Reset branch to trunk.
[official-gcc.git]
/
trunk
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
lambda
/
lambda-ref.C
blob
34ba263b2e57c231bd993eccba7db60fcebbe38f
1
// { dg-do "run" }
2
// { dg-options "-std=c++0x" }
3
4
#include <cassert>
5
6
int main() {
7
int i = 1;
8
float j = 2.0;
9
[&i, &j] () -> void { i = 3; j = 4.0; } ();
10
assert(i == 3);
11
assert(j == 4.0);
12
13
return 0;
14
}
15