summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/spaceship-eq8.C
blob: 61bcde55d1c1e0af54b76758723146a63c100ef9 (plain)
1
2
3
4
5
6
7
8
// PR c++/92966
// { dg-do compile { target c++20 } }

struct S {
  int operator==(const S&) const = default;	// { dg-error "must return 'bool'" }
  int s;					// { dg-message "declared here" "" { target *-*-* } .-1 }
};
static_assert(S{} == S{});			// { dg-error "" }