operator==,!=,<,<=,>,>=,<=> (std::stack)
|
template
<
class
T,
class
Container
>
bool
operator
==
(
const
std::
stack
<
T, Container
>
&
lhs,
|
(1) | |
|
template
<
class
T,
class
Container
>
bool
operator
!
=
(
const
std::
stack
<
T, Container
>
&
lhs,
|
(2) | |
|
template
<
class
T,
class
Container
>
bool
operator
<
(
const
std::
stack
<
T, Container
>
&
lhs,
|
(3) | |
|
template
<
class
T,
class
Container
>
bool
operator
<=
(
const
std::
stack
<
T, Container
>
&
lhs,
|
(4) | |
|
template
<
class
T,
class
Container
>
bool
operator
>
(
const
std::
stack
<
T, Container
>
&
lhs,
|
(5) | |
|
template
<
class
T,
class
Container
>
bool
operator
>=
(
const
std::
stack
<
T, Container
>
&
lhs,
|
(6) | |
|
template
<
class
T,
std::
three_way_comparable
Container
>
std::
compare_three_way_result_t
<
Container
>
|
(7) | (自 C++20 起) |
比较两个容器适配器底层容器的内容。该比较通过对底层容器应用相应的运算符来完成。
目录 |
参数
| lhs, rhs | - | 要进行比较内容的容器适配器 |
-
T
必须满足
EqualityComparable
的要求。
|
||
返回值
复杂度
与容器大小呈线性关系。
示例
|
本节内容不完整
原因:缺少示例 |
缺陷报告
以下行为变更缺陷报告被追溯应用于先前发布的C++标准。
| 缺陷报告 | 适用标准 | 发布时行为 | 正确行为 |
|---|---|---|---|
| LWG 410 | C++98 | 所有比较运算符的语义均缺失 | 已添加 |