☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
lambda-init11.C
☽
☼
gcc/testsuite/g++.dg/cpp1y/lambda-init11.C
code
plain
raw
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
}