Debian Codegraph @

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

raw
1 // PR c++/94478 - ICE with defaulted comparison operator.
2 // { dg-do compile { target c++20 } }
3
4 struct B {};
5 bool operator!=(const B&, const B&) = default; // { dg-error "not a friend" }
6 bool operator==(const B&, const B&) = default; // { dg-error "not a friend" }
7 bool operator<=>(const B&, const B&) = default; // { dg-error "not a friend" }