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 r157653 through r157895 into branch.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
lambda
/
lambda-non-const.C
blob
9c2b1195af30d21118f66f66192286ebd045c1ca
1
// { dg-do "run" }
2
// { dg-options "-std=c++0x" }
3
4
#include <cassert>
5
6
template<typename F>
7
void call(F f) { f(); }
8
9
int main() {
10
call([] () -> void {});
11
call([] () mutable -> void {});
12
13
int i = -1;
14
call([i] () mutable -> void { i = 0; });
15
assert(i == -1);
16
17
return 0;
18
}
19