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
c++, coroutines: Simplify separation of the user function body and ramp.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
lambda-init11.C
blob
4d434cd9ca08913fc19bc9e5b3687f89ebe079b5
1
// PR c++/61402
2
// { dg-do run { target c++14 } }
3
4
extern "C" void abort();
5
6
template<typename T>
7
void foo(T t) {
8
auto test = [ i = ++t ](T v) {
9
if (i != v)
10
abort();
11
};
12
test(t);
13
}
14
15
int main(){
16
foo(3.14f);
17
foo(0);
18
foo('a');
19
}