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-nop.C
blob
4a04cfbfb58934467412dd130a0bc8f71d0abb34
1
// { dg-do run { target c++11 } }
2
#include <cassert>
3
4
int main() {
5
int i = 1, j = 2;
6
[i, j] () -> void {} ();
7
assert(i == 1);
8
assert(j == 2);
9
[&i, &j] () -> void {} ();
10
assert(i == 1);
11
assert(j == 2);
12
[] (int x) -> void {} (1);
13
[] (int& x) -> void {} (i);
14
[] (int x, int y) -> void {} (i, j);
15
16
return 0;
17
}
18