// { dg-do compile { target c++11 } } template struct A { A() {} template A(const A&) {} bool operator==(const A&) const { return true; } }; A a; A b; auto c = (a == b); // { dg-error "ambiguous, even though the second is reversed" "" { target c++20 } }