https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109781
Bug ID: 109781 Summary: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eric.niebler at gmail dot com Target Milestone: --- template <auto A = []{ return []{}; }> struct C {}; ... on trunk with `-std=c++20` results in: <source>: In lambda function: <source>:1:31: error: lambda-expression in template parameter type 1 | template <auto A = []{ return []{}; }> | ^ Compiler returned: 1 I don't know of a reason why this code should be rejected.