(C++17) | ||||
| Sequence | ||||
(C++11) | ||||
(C++26) | ||||
(C++26) | ||||
(C++11) | ||||
| Associative | ||||
| Unordered associative | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Adaptors | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
| Views | ||||
(C++20) | ||||
(C++23) | ||||
| Tables | ||||
| Iterator invalidation | ||||
| Member function table | ||||
| Non-member function table |
std::stack| Member functions | ||||
| Element access | ||||
| Capacity | ||||
| Modifiers | ||||
(C++23) | ||||
(C++11) | ||||
(C++11) | ||||
| Non-member functions | ||||
(C++11) | ||||
operator==operator!=operator<operator>operator<=operator>=operator<=> (C++20) | ||||
| Helper classes | ||||
(C++11) | ||||
(C++23) | ||||
| Deduction guides(C++17) |
template<class T,class Container> bool operator==(conststd::stack<T, Container>& lhs, | (1) | |
template<class T,class Container> bool operator!=(conststd::stack<T, Container>& lhs, | (2) | |
template<class T,class Container> bool operator<(conststd::stack<T, Container>& lhs, | (3) | |
template<class T,class Container> bool operator<=(conststd::stack<T, Container>& lhs, | (4) | |
template<class T,class Container> bool operator>(conststd::stack<T, Container>& lhs, | (5) | |
template<class T,class Container> bool operator>=(conststd::stack<T, Container>& 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 |
| lhs, rhs | - | container adaptors whose contents to compare |
-T must meet the requirements ofEqualityComparable. | ||
Linear in the size of the container.
| This section is incomplete Reason: no example |
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 |