operators (std::time_point)
运算符=,%21=,<,<=,>,>=%28 std::time[医]点%29
| (1) | |
---|---|---|
template< class Clock, class Dur1, class Dur2 > bool operator==( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++11) (until C++14) | |
template< class Clock, class Dur1, class Dur2 > constexpr bool operator==( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++14) | |
| (2) | |
template< class Clock, class Dur1, class Dur2 > bool operator!=( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++11) (until C++14) | |
template< class Clock, class Dur1, class Dur2 > constexpr bool operator!=( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++14) | |
| (3) | |
template< class Clock, class Dur1, class Dur2 > bool operator<( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++11) (until C++14) | |
template< class Clock, class Dur1, class Dur2 > constexpr bool operator<( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++14) | |
| (4) | |
template< class Clock, class Dur1, class Dur2 > bool operator<=( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++11) (until C++14) | |
template< class Clock, class Dur1, class Dur2 > constexpr bool operator<=( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++14) | |
| (5) | |
template< class Clock, class Dur1, class Dur2 > bool operator>( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++11) (until C++14) | |
template< class Clock, class Dur1, class Dur2 > constexpr bool operator>( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++14) | |
| (6) | |
template< class Clock, class Dur1, class Dur2 > bool operator>=( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++11) (until C++14) | |
template< class Clock, class Dur1, class Dur2 > constexpr bool operator>=( const time_point<Clock,Dur1>& lhs, const time_point<Clock,Dur2>& rhs | (since C++14) |
比较两个时间点。通过比较结果进行了比较。time_since_epoch()
时间点。
1-2%29检查时间点lhs
和rhs
请参考给定时钟的相同时间点。
3-6%29比较时间点lhs
和rhs
...
参数
lhs, rhs | - | time points to compare |
---|
返回值
1%29true
如果lhs
和rhs
参考同一时间点,false
否则。
2%29true
如果lhs
和rhs
参考不同的时间点,false
否则。
3%29true
如果lhs
指时间点以前
rhs
,,,false
否则。
4%29true
如果lhs
指时间点以前
rhs
,或者在同一时间点rhs
,,,false
否则。
5%29true
如果lhs
指时间点后
rhs
,,,false
否则。
6%29true
如果lhs
指时间点后
rhs
,或者在同一时间点rhs
,,,false
否则。
例外
%280%29
注记
这些经营者不是constexpr
在C++11中,这一点在C++14中得到了纠正。
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。