Implement C++20 operator<=>.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / spaceship-eq4.C
blobd89fc885e5013aa064a73eea88a02bf7f5b92b90
1 // { dg-do compile { target c++2a } }
3 struct A {
4   int operator==(const A&) const = default; // { dg-error "return .bool" }
5   bool operator==(const A&, const A&) const = default; // { dg-error "exactly one" }
6   bool operator==(int) const = default; // { dg-error "parameter type" }
7   bool operator==(const A&) = default; // { dg-error "const" }
8 };