Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/pr64382.C

raw
1 // PR c++/64382
2 // { dg-do compile { target c++14 } }
3
4 template<typename T>
5 struct my_queue
6 {
7 void push(T)
8 {
9 }
10 void ice()
11 {
12 auto L = [=](auto &&v) { // { dg-warning "implicit capture" "" { target c++2a } }
13 push(v);
14 };
15 trav(L);
16 }
17 template<typename F>
18 void trav(F &&f)
19 {
20 f(T());
21 }
22 };
23 template struct my_queue<int>;