operator==,!=,<,<=,>,>=,<=>(std::stack)
std::stack
bool operator==( const std::stack <T, Container>& lhs,
bool operator!=( const std::stack <T, Container>& lhs,
bool operator< ( const std::stack <T, Container>& lhs,
bool operator<=( const std::stack <T, Container>& lhs,
bool operator> ( const std::stack <T, Container>& lhs,
bool operator>=( const std::stack <T, Container>& lhs,
std::compare_three_way_result_t <Container>
operator<=>( const std::stack <T, Container>& lhs,
Compares the contents of the underlying containers of two container adaptors. The comparison is done by applying the corresponding operator to the underlying containers.
[edit] Parameters
T
must meet the requirements of EqualityComparable.
[edit] Return value
[edit] Complexity
Linear in the size of the container.
[edit] Example
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 all comparison operators were missing | added |