https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94252
Bug ID: 94252 Summary: Can't use a lambda in a requires expression Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: barry.revzin at gmail dot com Target Milestone: --- This program: auto f = []{ return 0; }; static_assert(requires { f(); }); Fails to compile on trunk (https://godbolt.org/z/DEuoVM), with the error: <source>:2:15: error: static assertion failed 2 | static_assert(requires { f(); }); | ^~~~~~~~~~~~~~~~~