https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59655
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Last reconfirmed|2018-05-03 00:00:00 |2019-03-08 --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- A rejects-valid case from Bug 89633: The following excerpt builds fine on MSVC, ICC and clang: struct S { template <typename Function> void frob(const Function&); struct T { T(S* s) { s->frob([]() {}); } }; }; but GCC fails with <source>:3:8: error: 'void S::frob(const Function&) [with Function = S::T::T(S*)::<lambda()>]', declared using local type 'const S::T::T(S*)::<lambda()>', is used but never defined [-fpermissive] 3 | void frob(const Function&); | ^~~~ Passing anything other than a lambda to S::frob(), or making it take a function pointer rather than a template argument, works.