Namespaces
Variants

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

From cppreference.net

friend bool operator == ( const std:: flat_set & lhs,
const std:: flat_set & rhs ) ;
(1) (C++23 起)
friend synth - three - way - result < value_type >

operator <=> ( const std:: flat_set & lhs,

const std:: flat_set & rhs ) ;
(2) (C++23 起)
Compares the contents of the underlying containers of two container adaptors. The comparison is done by applying the corresponding operator to the underlying containers.

目录

参数

lhs, rhs - 要进行比较内容的容器适配器

返回值

1) true 当对应比较结果为 true 时,否则为 false
2) 底层容器的三方比较结果。

复杂度

1) lhs rhs 大小不同时为常数时间复杂度,否则与 flat_set 的大小成线性关系。
2) 与容器大小呈线性关系。

示例