gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr2.C
raw| 1 | // PR c++/93650 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | namespace std { |
| 5 | using type = enum _Ord { less }; |
| 6 | class strong_ordering { |
| 7 | type _M_value; |
| 8 | constexpr strong_ordering(_Ord) : _M_value() {} |
| 9 | static const strong_ordering less; |
| 10 | static strong_ordering equal; |
| 11 | static strong_ordering greater; |
| 12 | } constexpr strong_ordering::less(_Ord::less); |
| 13 | auto v = 1 <=> 2; |
| 14 | } |