std::chrono::operator==, <, <=, >, >=, <=>
From cppreference.com
< cpp | chrono | leap second
ヘッダー <chrono> で定義
constexpr bool operator==( const std::chrono::leap_second& x,
const std::chrono::leap_second& y ) noexcept;
(1)
(C++20以降)
constexpr std::strong_ordering operator<=>( const std::chrono::leap_second& x,
const std::chrono::leap_second& y ) noexcept;
(2)
(C++20以降)
template< class Duration >
constexpr bool operator==( const std::chrono::leap_second& x,
const std::chrono::sys_time<Duration>& y ) noexcept;
(3)
(C++20以降)
template< class Duration >
constexpr bool operator< ( const std::chrono::leap_second& x,
const std::chrono::sys_time<Duration>& y ) noexcept;
(4)
(C++20以降)
template< class Duration >
constexpr bool operator< ( const std::chrono::sys_time<Duration>& x,
const std::chrono::leap_second& y ) noexcept;
(5)
(C++20以降)
template< class Duration >
constexpr bool operator> ( const std::chrono::leap_second& x,
const std::chrono::sys_time<Duration>& y ) noexcept;
(6)
(C++20以降)
template< class Duration >
constexpr bool operator> ( const std::chrono::sys_time<Duration>& x,
const std::chrono::leap_second& y ) noexcept;
(7)
(C++20以降)
template< class Duration >
constexpr bool operator<=( const std::chrono::leap_second& x,
const std::chrono::sys_time<Duration>& y ) noexcept;
(8)
(C++20以降)
template< class Duration >
constexpr bool operator<=( const std::chrono::sys_time<Duration>& x,
const std::chrono::leap_second& y ) noexcept;
(9)
(C++20以降)
template< class Duration >
constexpr bool operator>=( const std::chrono::leap_second& x,
const std::chrono::sys_time<Duration>& y ) noexcept;
(10)
(C++20以降)
template< class Duration >
constexpr bool operator>=( const std::chrono::sys_time<Duration>& x,
const std::chrono::leap_second& y ) noexcept;
(11)
(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)
(C++20以降)
オブジェクト x および y によって表される日時を比較します。
(12) の戻り値の型は x.date() <=> y から推論されるため、std::chrono::seconds と Duration の3者間比較結果の型になります。
!= 演算子は operator== から合成される。
[編集] 戻り値
1) x.date() == y.date()
2) x.date() <=> y.date()
3) x.date() == y
4) x.date() < y
5) x < y.date()
6) x.date() > y
7) x > y.date()
8) x.date() <= y
9) x <= y.date()
10) x.date() >= y
11) x >= y.date()
12) x.date() <=> y
| ヘッダー <chrono> で定義 |
||
| constexpr bool operator==( const std::chrono::leap_second& x, const std::chrono::leap_second& y ) noexcept; |
(1) | (C++20以降) |
| constexpr std::strong_ordering operator<=>( const std::chrono::leap_second& x, const std::chrono::leap_second& y ) noexcept; |
(2) | (C++20以降) |
| template< class Duration > constexpr bool operator==( const std::chrono::leap_second& x, |
(3) | (C++20以降) |
| template< class Duration > constexpr bool operator< ( const std::chrono::leap_second& x, |
(4) | (C++20以降) |
| template< class Duration > constexpr bool operator< ( const std::chrono::sys_time<Duration>& x, |
(5) | (C++20以降) |
| template< class Duration > constexpr bool operator> ( const std::chrono::leap_second& x, |
(6) | (C++20以降) |
| template< class Duration > constexpr bool operator> ( const std::chrono::sys_time<Duration>& x, |
(7) | (C++20以降) |
| template< class Duration > constexpr bool operator<=( const std::chrono::leap_second& x, |
(8) | (C++20以降) |
| template< class Duration > constexpr bool operator<=( const std::chrono::sys_time<Duration>& x, |
(9) | (C++20以降) |
| template< class Duration > constexpr bool operator>=( const std::chrono::leap_second& x, |
(10) | (C++20以降) |
| template< class Duration > constexpr bool operator>=( const std::chrono::sys_time<Duration>& x, |
(11) | (C++20以降) |
| template< class Duration > requires std::three_way_comparable_with< |
(12) | (C++20以降) |
オブジェクト x および y によって表される日時を比較します。
(12) の戻り値の型は x.date() <=> y から推論されるため、std::chrono::seconds と Duration の3者間比較結果の型になります。
!= 演算子は operator== から合成される。