@@ -55,6 +55,7 @@ class leap_second {
55
55
_LIBCPP_HIDE_FROM_ABI inline constexpr bool operator ==(const leap_second& __x, const leap_second& __y) {
56
56
return __x.date () == __y.date ();
57
57
}
58
+
58
59
_LIBCPP_HIDE_FROM_ABI inline constexpr strong_ordering operator <=>(const leap_second& __x, const leap_second& __y) {
59
60
return __x.date () <=> __y.date ();
60
61
}
@@ -63,43 +64,56 @@ template <class _Duration>
63
64
_LIBCPP_HIDE_FROM_ABI constexpr bool operator ==(const leap_second& __x, const sys_time<_Duration>& __y) {
64
65
return __x.date () == __y;
65
66
}
67
+
66
68
template <class _Duration >
67
69
_LIBCPP_HIDE_FROM_ABI constexpr bool operator <(const leap_second& __x, const sys_time<_Duration>& __y) {
68
70
return __x.date () < __y;
69
71
}
72
+
70
73
template <class _Duration >
71
74
_LIBCPP_HIDE_FROM_ABI constexpr bool operator <(const sys_time<_Duration>& __x, const leap_second& __y) {
72
75
return __x < __y.date ();
73
76
}
77
+
74
78
template <class _Duration >
75
79
_LIBCPP_HIDE_FROM_ABI constexpr bool operator >(const leap_second& __x, const sys_time<_Duration>& __y) {
76
80
return __y < __x;
77
81
}
82
+
78
83
template <class _Duration >
79
84
_LIBCPP_HIDE_FROM_ABI constexpr bool operator >(const sys_time<_Duration>& __x, const leap_second& __y) {
80
85
return __y < __x;
81
86
}
87
+
82
88
template <class _Duration >
83
89
_LIBCPP_HIDE_FROM_ABI constexpr bool operator <=(const leap_second& __x, const sys_time<_Duration>& __y) {
84
90
return !(__y < __x);
85
91
}
92
+
86
93
template <class _Duration >
87
94
_LIBCPP_HIDE_FROM_ABI constexpr bool operator <=(const sys_time<_Duration>& __x, const leap_second& __y) {
88
95
return !(__y < __x);
89
96
}
97
+
90
98
template <class _Duration >
91
99
_LIBCPP_HIDE_FROM_ABI constexpr bool operator >=(const leap_second& __x, const sys_time<_Duration>& __y) {
92
100
return !(__x < __y);
93
101
}
102
+
94
103
template <class _Duration >
95
104
_LIBCPP_HIDE_FROM_ABI constexpr bool operator >=(const sys_time<_Duration>& __x, const leap_second& __y) {
96
105
return !(__x < __y);
97
106
}
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.
98
111
template <class _Duration >
99
112
requires three_way_comparable_with<sys_seconds, sys_time<_Duration>>
100
113
_LIBCPP_HIDE_FROM_ABI constexpr auto operator <=>(const leap_second& __x, const sys_time<_Duration>& __y) {
101
114
return __x.date () <=> __y;
102
115
}
116
+ # endif
103
117
104
118
} // namespace chrono
105
119
0 commit comments