Debian Codegraph @

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

raw
1 // PR c++/92966
2 // { dg-do compile { target c++20 } }
3
4 struct S {
5 int operator==(const S&) const = default; // { dg-error "must return 'bool'" }
6 int s; // { dg-message "declared here" "" { target *-*-* } .-1 }
7 };
8 static_assert(S{} == S{}); // { dg-error "" }