// PR c++/86875 // { dg-do compile { target c++14 } } template using decay_t = _Tp; template class A { Fun fun_; public: template A(T p1) : fun_(p1) {} auto operator()() { fun_(this); } }; template auto y_combinator(Fun p1) { return A>(p1); } int main() { const unsigned int w = 1; auto foo = y_combinator([=](auto) { auto i = +w; }); foo(); }