https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115145
Bug ID: 115145 Summary: Help lambda in rewritten std::variant comparisons does not specify return type Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- ..which can be an regression: #include <variant> struct Bool { operator bool(); Bool(const Bool&) = delete; }; struct Elem { Bool& operator==(const Elem&) const; }; int main() { std::variant<Elem> v; return v == v; } https://godbolt.org/z/14q14TrYW