- chrono[meta header]
- std::chrono[meta namespace]
- function[meta id-type]
- cpp20[meta cpp]
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
}- three_way_comparable_with[link /reference/compare/three_way_comparable.md]
- sys_seconds[link /reference/chrono/sys_time.md]
- sys_time[link /reference/chrono/sys_time.md]
三方比較を行う。
- (1) :
leap_secondオブジェクト同士の三方比較を行う - (2) :
leap_secondオブジェクトとsys_timeオブジェクトの三方比較を行う
-
(1) :
return x.date() <=> y.date();- date()[link date.md]
-
(2) :
return x.date() <=> y;- x.date()[link date.md]
投げない
- この演算子により、
operator<、operator<=、operator>、operator>=が使用可能になる
- C++20
- Clang: (9.0時点で実装なし)
- GCC: (9.2時点で実装なし)
- Visual C++: (2019 Update 3時点で実装なし)