Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C

raw
1 // PR c++/94583
2 // { dg-do compile { target c++20 } }
3
4 namespace std { struct strong_ordering { }; }
5
6 bool operator==(const struct Q&, const struct Q&);
7 struct Q {
8 // { dg-error "defaulted after its first declaration" "" { target *-*-* } .+1 }
9 friend std::strong_ordering operator<=>(const Q&, const Q&) = default;
10 };
11 bool b = Q() == Q();