operator==,!=,<,<=,>,>=,<=>(std::stack)

Compares the contents of the underlying containers of two container adaptors. The comparison is done by applying the corresponding operator to the underlying containers.

# Declarations

template< class T, class Container >
bool operator==( const std::stack<T, Container>& lhs,
const std::stack<T, Container>& rhs );
template< class T, class Container >
bool operator!=( const std::stack<T, Container>& lhs,
const std::stack<T, Container>& rhs );
template< class T, class Container >
bool operator< ( const std::stack<T, Container>& lhs,
const std::stack<T, Container>& rhs );
template< class T, class Container >
bool operator<=( const std::stack<T, Container>& lhs,
const std::stack<T, Container>& rhs );
template< class T, class Container >
bool operator> ( const std::stack<T, Container>& lhs,
const std::stack<T, Container>& rhs );
template< class T, class Container >
bool operator>=( const std::stack<T, Container>& lhs,
const std::stack<T, Container>& rhs );
template< class T, std::three_way_comparable Container >
std::compare_three_way_result_t<Container>
operator<=>( const std::stack<T, Container>& lhs,
const std::stack<T, Container>& rhs );

(since C++20)

# Parameters

# Example

This section is incompleteReason: no example

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 410C++98the semantics of all comparison operators were missingadded