// { dg-do compile { target c++20 } } // We wrongly considered D to be ne_comparable because we were looking for a // corresponding op!= for N::op== in ::, because ::op== happened to be the // first thing in the lookup set. template struct enable_if; template struct enable_if { typedef _Tp type; }; template struct A { }; namespace N { struct X { }; template auto operator== (const A&, const A&) -> typename enable_if::type; template auto operator!= (const A&, const A&) -> typename enable_if::type; } template concept ne_comparable = requires (const A& t, const A& u) { t != u; }; struct D { }; int operator==(D, D); bool operator!=(D, D) = delete; static_assert( ! ne_comparable );