aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C
blob: 4765601f2390797420f44ecfdf613eb83df8a731 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/94583
// { dg-do compile { target c++20 } }

namespace std { struct strong_ordering { }; }

bool operator==(const struct Q&, const struct Q&);
struct Q {
  // { dg-error "defaulted after its first declaration" "" { target *-*-* } .+1 }
  friend std::strong_ordering operator<=>(const Q&, const Q&) = default;
};
bool b = Q() == Q();