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