1 // PR c++/78018
2 // { dg-do compile { target c++14 } }
3 
4 struct A
5 {
6     void f1();
7 
8     template <typename F>
9     void f2(F f);
10 
11     template<typename T>
12     void f3(T t);
13 };
14 
15 struct B
16 {
17     template<typename L>
fB18     void f(L) { }
19 };
20 
f1()21 void A::f1()
22 {
23     f2([&] (auto t) { f3(t); } );
24 }
25 
26 template <typename F>
f2(F f)27 void A::f2(F f)
28 {
29     B b;
30     f(b);
31 }
32 
33 template<typename T>
f3(T t)34 void A::f3(T t)
35 {
36 }
37 
38