operator==,<=>(std::flat_set)

来自cppreference.com
< cpp‎ | container‎ | flat set
 
 
 
 
friendbool operator==(conststd::flat_set& lhs,
                        conststd::flat_set& rhs );
(1) (C++23 起)
friend synth-three-way-result<value_type>

    operator<=>(conststd::flat_set& lhs,

                 conststd::flat_set& rhs );
(2) (C++23 起)
比较两个容器适配器的底层容器。通过应用对应的运算符到底层容器进行比较。

目录

[编辑]参数

lhs, rhs - 要比较内容的迭代器适配器

[编辑]返回值

1) 对应比较得到 true 时返回 true,否则返回 false
2) 底层容器上三路比较的结果。

[编辑]复杂度

1)lhsrhs 为不同大小则为常数,否则与 flat_set 的大小成线性。
2) 与容器大小呈线性。

[编辑]示例

close