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
Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
lambda
/
lambda-ice3.C
blob
371d03f941f87624fe88b8bbdfca1b4c82ff5335
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|non-static" }
15
return false;
16
};
17
18
return true;
19
}
20
21
int main()
22
{
23
Klass c;
24
return 0;
25
}