@@ -55,6 +55,7 @@ class leap_second {
5555_LIBCPP_HIDE_FROM_ABI inline constexpr bool operator ==(const leap_second& __x, const leap_second& __y) {
5656 return __x.date () == __y.date ();
5757}
58+
5859_LIBCPP_HIDE_FROM_ABI inline constexpr strong_ordering operator <=>(const leap_second& __x, const leap_second& __y) {
5960 return __x.date () <=> __y.date ();
6061}
@@ -63,43 +64,56 @@ template <class _Duration>
6364_LIBCPP_HIDE_FROM_ABI constexpr bool operator ==(const leap_second& __x, const sys_time<_Duration>& __y) {
6465 return __x.date () == __y;
6566}
67+
6668template <class _Duration >
6769_LIBCPP_HIDE_FROM_ABI constexpr bool operator <(const leap_second& __x, const sys_time<_Duration>& __y) {
6870 return __x.date () < __y;
6971}
72+
7073template <class _Duration >
7174_LIBCPP_HIDE_FROM_ABI constexpr bool operator <(const sys_time<_Duration>& __x, const leap_second& __y) {
7275 return __x < __y.date ();
7376}
77+
7478template <class _Duration >
7579_LIBCPP_HIDE_FROM_ABI constexpr bool operator >(const leap_second& __x, const sys_time<_Duration>& __y) {
7680 return __y < __x;
7781}
82+
7883template <class _Duration >
7984_LIBCPP_HIDE_FROM_ABI constexpr bool operator >(const sys_time<_Duration>& __x, const leap_second& __y) {
8085 return __y < __x;
8186}
87+
8288template <class _Duration >
8389_LIBCPP_HIDE_FROM_ABI constexpr bool operator <=(const leap_second& __x, const sys_time<_Duration>& __y) {
8490 return !(__y < __x);
8591}
92+
8693template <class _Duration >
8794_LIBCPP_HIDE_FROM_ABI constexpr bool operator <=(const sys_time<_Duration>& __x, const leap_second& __y) {
8895 return !(__y < __x);
8996}
97+
9098template <class _Duration >
9199_LIBCPP_HIDE_FROM_ABI constexpr bool operator >=(const leap_second& __x, const sys_time<_Duration>& __y) {
92100 return !(__x < __y);
93101}
102+
94103template <class _Duration >
95104_LIBCPP_HIDE_FROM_ABI constexpr bool operator >=(const sys_time<_Duration>& __x, const leap_second& __y) {
96105 return !(__x < __y);
97106}
107+
108+ # ifndef _LIBCPP_COMPILER_GCC
109+ // This requirement cauese a compilation loop in GCC-13 and running out of memory.
110+ // TODO TZDB Test whether GCC-14 fixes this.
98111template <class _Duration >
99112 requires three_way_comparable_with<sys_seconds, sys_time<_Duration>>
100113_LIBCPP_HIDE_FROM_ABI constexpr auto operator <=>(const leap_second& __x, const sys_time<_Duration>& __y) {
101114 return __x.date () <=> __y;
102115}
116+ # endif
103117
104118} // namespace chrono
105119
0 commit comments