https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88313
Bug ID: 88313 Summary: generic lambda in default template argument Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blitzrakete at gmail dot com Target Milestone: --- gcc (with no flags) rejects the following code: // 'auto' parameter not permitted in this context template <int = [](auto) { return 0; }(1)> void f(); This is bogus because anywhere where a non-generic lambda is allowed, a generic one is allowed too. Replacing 'auto' with 'int' makes gcc accept the code.