Namespaces
Variants
Actions

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

From cppreference.com
< cpp‎ | container‎ | flat set
 
C++
 
Containers library
 
std::flat_set
friend bool operator==( const std::flat_set& lhs,
                        const std::flat_set& rhs );
(1) (since C++23)
friend synth-three-way-result<value_type>

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

                 const std::flat_set& rhs );
(2) (since 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.

Contents

[edit] Parameters

lhs, rhs - container adaptors whose contents to compare

[edit] Return value

1) true if the corresponding comparison yields true, false otherwise.
2) Result of three-way comparison on underlying containers.

[edit] Complexity

1) Constant if lhs and rhs are of different size, otherwise linear in the size of the flat_set.
2) Linear in the size of the container.

[edit] Example

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant