Namespaces
Variants

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

From cppreference.net

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

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

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

Inhaltsverzeichnis

Parameter

lhs, rhs - Container-Adaptoren, deren Inhalte verglichen werden sollen

Rückgabewert

1) true falls der entsprechende Vergleich true ergibt, false andernfalls.
2) Ergebnis des Drei-Wege-Vergleichs auf zugrundeliegenden Containern.

Komplexität

1) Konstant, wenn lhs und rhs unterschiedliche Größe haben, andernfalls linear in der Größe der flat_map .
2) Linear in der Größe des Containers.

Beispiel