https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101155
Bug ID: 101155 Summary: comparing non-capturing lambdas is not constexpr Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- I think the following function pointer comparison should be constexpr. ``` auto a = []{}; auto b = []{}; static_assert(a != b); // error: '(<lambda()>::_FUN != <lambda()>::_FUN)' is not a constant expression ``` CE example: https://godbolt.org/z/avqPhrc6G