1 // { dg-do run { target c++20 } }
9 auto operator<=>(C const&) const = default;
15 auto operator<=>(D const&) const = default;
21 auto operator<=>(E const&) const = default;
27 constexpr C c1 = { 1, { 2, 3, 4, 5 } };
28 constexpr C c2 = { 1, { 2, 3, 5, 4 } };
29 constexpr C c3 = { 1, { 2, 2, 6, 7 } };
30 static_assert (c1 < c2);
31 static_assert (c3 < c1);
32 constexpr D d1 = { 1, { 2 } };
33 constexpr D d2 = { 1, { 3 } };
34 constexpr D d3 = { 1, { 1 } };
35 static_assert (d1 < d2);
36 static_assert (d3 < d1);
37 constexpr E e1 = { 1, {} };
38 constexpr E e2 = { 2, {} };
39 constexpr E e3 = { 1, {} };
40 static_assert (e1 < e2);
41 static_assert (e1 == e3);
42 C c4 = { 1, { 2, 3, 4, 5 } };
43 C c5 = { 1, { 2, 3, 5, 4 } };
44 C c6 = { 1, { 2, 2, 6, 7 } };
45 if (c4 >= c5 || c6 >= c4)
50 if (d4 >= d5 || d6 >= d4)
55 if (e4 >= e5 || e4 != e6)