aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/spaceship-ref1.C
blob: 5f888dfc3b4a867c2a945da66e63532c67246f2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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 "" }
};