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-ice3.C
blob
03a7a4bb60d0539ad13d23b9e8e98aae9f3591eb
1
// PR c++/47795
2
// { dg-do compile { target c++11 } }
3
4
class Klass
5
{
6
unsigned int local;
7
public:
8
bool dostuff();
9
};
10
11
bool Klass::dostuff()
12
{
13
auto f = []() -> bool {
14
if (local & 1) { return true; } // { dg-error "not captured" }
15
return false;
16
};
17
}
18
19
int main()
20
{
21
Klass c;
22
return 0;
23
}