Debian Codegraph @

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

raw
1 // P2002: Allow default comparison of unions with no members.
2 // { dg-do compile { target c++20 } }
3
4 union A
5 {
6 bool operator==(const A&) const = default;
7 };
8
9 int main()
10 {
11 A() == A();
12 }