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-deduce-ext-neg2.C
blob
fdbb4e1e377de3315e2054dece6feef2308865c0
1
// Test that this is accepted even when pedantic now that it's part
2
// of the standard.
3
4
// { dg-do compile { target c++11 } }
5
// { dg-options "-pedantic" }
6
7
bool b;
8
template <class T>
9
T f (T t)
10
{
11
[=] { return t+1; }; // OK
12
return [=] {
13
auto i = t+1;
14
return i+1;
15
}();
16
}
17
18
int main()
19
{
20
if (f(1) != 3)
21
return 1;
22
}