On this page
operator==,!=,<,<=,>,>=,<=>(std::queue)
|  | (1) | |
|  | (2) | |
|  | (3) | |
|  | (4) | |
|  | (5) | |
|  | (6) | |
|  | (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.
Parameters
| lhs, rhs | - | container adaptors whose contents to compare | 
| - Tmust meet the requirements of EqualityComparable. | ||
Return value
1-6) 
  true if the corresponding comparison yields true, false otherwise.
  7) Result of three-way comparison on underlying containers.
  
  Complexity
Linear in the size of the container.
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 operators !=,>,<=and>=were missing | added | 
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
 https://en.cppreference.com/w/cpp/container/queue/operator_cmp