]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/cpp2a/spaceship-eq14.C
rs6000, change altivec*-runnable.c test file names
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp2a / spaceship-eq14.C
1 // PR c++/106361
2 // { dg-do compile { target c++20 } }
3
4 struct foo {
5 int x;
6 };
7
8 struct bar {
9 foo f; // { dg-error "operator==" }
10 friend bool operator==(const bar& a, const bar& b);
11 };
12
13 bool operator==(const bar& a, const bar& b) = default;
14
15 int main() {
16 return bar{} == bar{}; // { dg-error "deleted" }
17 }