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 起)
(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 起)
(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 起)
(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 起)
(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 > ( |
比较两个时间点。该比较通过比较时间点的 time_since_epoch() 结果来实现。
Dur1
与
Dur2
的三路比较结果类型。
|
|
(C++20 起) |
目录 |
参数
| lhs, rhs | - | 待比较的时间点 |
返回值
异常
可能抛出实现定义的异常。
注释
C++11 中
time_point
的双向比较运算符未声明为
constexpr
,该问题已在 C++14 中得到修正。