(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
cpp2a/
spaceship-ref1.C
// Reject &&.
// { dg-do compile { target c++20 } }

struct A
{
  bool operator==(const A&) const && = default; // { dg-error "ref-qualifier" }
};

struct B
{
  friend bool operator==(const B&&, const B&&) = default; // { dg-error "" }
};