Debian Codegraph @

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

raw
1 // PR c++/77739
2 // { dg-do compile { target c++14 } }
3
4 struct A {
5 A();
6 A(const A &);
7 };
8 struct B {
9 B();
10 template <typename... Args> auto g(Args &&... p1) {
11 return [=] { f(p1...); }; // { dg-warning "implicit capture" "" { target c++2a } }
12 }
13 void f(A, const char *);
14 };
15 B::B() { g(A(), ""); }