operator==,!=,<,<=,>,>=,<=>(std::{{{1}}})
From cppreference.com
template< ... > bool operator==( const std::{{{1}}}<...>& lhs, |
(1) | |
template< ... > bool operator!=( const std::{{{1}}}<...>& lhs, |
(2) | |
template< ... > bool operator< ( const std::{{{1}}}<...>& lhs, |
(3) | |
template< ... > bool operator<=( const std::{{{1}}}<...>& lhs, |
(4) | |
template< ... > bool operator> ( const std::{{{1}}}<...>& lhs, |
(5) | |
template< ... > bool operator>=( const std::{{{1}}}<...>& lhs, |
(6) | |
template< class T, std::three_way_comparable Container > std::compare_three_way_result_t<Container> |
(7) | (since C++20) |
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 |
-T must meet the requirements of EqualityComparable.
|
[edit] Return value
1-6) true if the corresponding comparison yields true, false otherwise.
7) Result of three-way comparison on underlying containers.
[edit] Complexity
Linear in the size of the container.
[edit] Example
This section is incomplete Reason: no example |
Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 410 | C++98 | the semantics of were missing | added |