namespace std::chrono {
constexpr strong_ordering
operator<=>(const leap_second& x, const leap_second& y) noexcept; // (1) C++20
template <class Duration>
requires three_way_comparable_with<sys_seconds, sys_time<Duration>>
constexpr auto
operator<=>(const leap_second& x, const sys_time<Duration>& y) noexcept; // (2) C++20
}
概要
三方比較を行う。
- (1) :
leap_second
オブジェクト同士の三方比較を行う - (2) :
leap_second
オブジェクトとsys_time
オブジェクトの三方比較を行う
戻り値
-
(1) :
-
(2) :
return x.date() <=> y;
例外
投げない
備考
- この演算子により、
operator<
、operator<=
、operator>
、operator>=
が使用可能になる
バージョン
言語
- C++20
処理系
- Clang: 9.0 ❌
- GCC: 9.2 ❌
- Visual C++: 2019 Update 3 ❌