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
Rebase.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
lambda
/
lambda-mutable2.C
blob
c54ff5c841cdc96dd78864f9351d219276f0f306
1
// PR c++/55532
2
// { dg-do compile { target c++11 } }
3
4
struct Foo {
5
void doit() {
6
}
7
};
8
9
template<typename T>
10
void oops(Foo &foo, const T &) {
11
auto fun = [&] () mutable {
12
foo.doit();
13
};
14
auto fun2 = [=]() {
15
fun(); // { dg-error "" }
16
};
17
fun2();
18
}
19
20
int main() {
21
Foo foo;
22
oops(foo, 1);
23
}