(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) |
Compares two time points. The comparison is done by comparing the results time_since_epoch()
for the time points.
lhs
and rhs
refer to the same time point for the given clock.lhs
and rhs
.lhs, rhs | - | time points to compare |
true
if the lhs
and rhs
refer to the same time point, false
otherwise.true
if the lhs
and rhs
refer to different time points, false
otherwise.true
if the lhs
refers to time point before rhs
, false
otherwise.true
if the lhs
refers to time point before rhs
, or to the same time point as rhs
, false
otherwise.true
if the lhs
refers to time point after rhs
, false
otherwise.true
if the lhs
refers to time point after rhs
, or to the same time point as rhs
, false
otherwise.(none).
These operators were not constexpr
in C++11, this was corrected in C++14.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/chrono/time_point/operator_cmp