Defined in header <chrono> | ||
---|---|---|
constexpr bool operator==( const std::chrono::leap_second& x, const std::chrono::leap_second& y ) noexcept; | (1) | (since C++20) |
constexpr std::strong_ordering operator<=>( const std::chrono::leap_second& x, const std::chrono::leap_second& y ) noexcept; | (2) | (since C++20) |
template< class Duration > constexpr bool operator==( const std::chrono::leap_second& x, const std::chrono::sys_time<Duration>& y ) noexcept; | (3) | (since C++20) |
template< class Duration > constexpr bool operator< ( const std::chrono::leap_second& x, const std::chrono::sys_time<Duration>& y ) noexcept; | (4) | (since C++20) |
template< class Duration > constexpr bool operator< ( const std::chrono::sys_time<Duration>& x, const std::chrono::leap_second& y ) noexcept; | (5) | (since C++20) |
template< class Duration > constexpr bool operator> ( const std::chrono::leap_second& x, const std::chrono::sys_time<Duration>& y ) noexcept; | (6) | (since C++20) |
template< class Duration > constexpr bool operator> ( const std::chrono::sys_time<Duration>& x, const std::chrono::leap_second& y ) noexcept; | (7) | (since C++20) |
template< class Duration > constexpr bool operator<=( const std::chrono::leap_second& x, const std::chrono::sys_time<Duration>& y ) noexcept; | (8) | (since C++20) |
template< class Duration > constexpr bool operator<=( const std::chrono::sys_time<Duration>& x, const std::chrono::leap_second& y ) noexcept; | (9) | (since C++20) |
template< class Duration > constexpr bool operator>=( const std::chrono::leap_second& x, const std::chrono::sys_time<Duration>& y ) noexcept; | (10) | (since C++20) |
template< class Duration > constexpr bool operator>=( const std::chrono::sys_time<Duration>& x, const std::chrono::leap_second& y ) noexcept; | (11) | (since C++20) |
template< class Duration > requires std::three_way_comparable_with< std::chrono::sys_seconds, std::chrono::sys_time<Duration>> constexpr auto operator<=>( const std::chrono::leap_second& x, const std::chrono::sys_time<Duration>& y ) noexcept; | (12) | (since C++20) |
Compares the date and time represented by the objects x
and y
.
Return type of (12) is deduced from x.date() <=> y
, and hence the three-way comparison result type of std::chrono::seconds
and Duration
.
The !=
operator is synthesized from operator==
.
x.date() == y.date()
x.date() <=> y.date()
x.date() == y
x.date() < y
x < y.date()
x.date() > y
x > y.date()
x.date() <= y
x <= y.date()
x.date() >= y
x >= y.date()
x.date() <=> y
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/chrono/leap_second/operator_cmp