operator==,!=,<,<=,>,>=,<=>(std::chrono::time_point)
| 定義於標頭檔案 <chrono> |
||
| (1) | ||
template< class Clock, class Dur1, class Dur2 > bool operator==( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++11 起) (until C++14) |
|
| template< class Clock, class Dur1, class Dur2 > constexpr bool operator==( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++14 起) | |
| (2) | ||
template< class Clock, class Dur1, class Dur2 > bool operator!=( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++11 起) (until C++14) |
|
| template< class Clock, class Dur1, class Dur2 > constexpr bool operator!=( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++14 起) (C++20 前) |
|
| (3) | ||
template< class Clock, class Dur1, class Dur2 > bool operator<( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++11 起) (until C++14) |
|
| template< class Clock, class Dur1, class Dur2 > constexpr bool operator<( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++14 起) | |
| (4) | ||
template< class Clock, class Dur1, class Dur2 > bool operator<=( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++11 起) (until C++14) |
|
| template< class Clock, class Dur1, class Dur2 > constexpr bool operator<=( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++14 起) | |
| (5) | ||
template< class Clock, class Dur1, class Dur2 > bool operator>( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++11 起) (until C++14) |
|
| template< class Clock, class Dur1, class Dur2 > constexpr bool operator>( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++14 起) | |
| (6) | ||
template< class Clock, class Dur1, class Dur2 > bool operator>=( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++11 起) (until C++14) |
|
| template< class Clock, class Dur1, class Dur2 > constexpr bool operator>=( const std::chrono::time_point<Clock,Dur1>& lhs, |
(C++14 起) | |
| template< class Clock, class Dur1, std::three_way_comparable_with<Dur1> Dur2 > constexpr auto operator<=>( const std::chrono::time_point<Clock,Dur1>& lhs, |
(7) | (C++20 起) |
比較兩個時間點。比較是透過比較時間點的 time_since_epoch() 結果完成的。
Dur1 和 Dur2 的三向比較結果型別。|
|
(C++20 起) |
目錄 |
[編輯] 引數
| lhs, rhs | - | 要比較的時間點 |
[編輯] 返回值
[編輯] 異常
可能丟擲實現定義的異常。
[編輯] 注意
在 C++11 中,time_point 的雙向比較運算子不是 constexpr,這在 C++14 中得到了糾正。