名稱空間
變體
操作

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

來自 cppreference.com
< cpp‎ | 容器‎ | flat map
 
 
 
 
friend bool operator==( const std::flat_map& lhs,
                        const std::flat_map& rhs );
(1) (C++23 起)
friend synth-three-way-result<value_type>

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

                 const std::flat_map& rhs );
(2) (C++23 起)
比較兩個容器介面卡底層容器的內容。比較是透過將相應的運算子應用於底層容器來完成的。

目錄

[編輯] 引數

lhs, rhs - 要比較其內容的容器介面卡

[編輯] 返回值

1) 如果對應的比較結果為 true 則返回 true,否則返回 false
2) 基礎容器的三路比較結果。

[編輯] 複雜度

1) 如果 lhsrhs 的大小不同,則為常數時間,否則與 flat_map 的大小成線性關係。
2) 與容器大小呈線性關係。

[編輯] 示例