function
<queue>

std::relational operators (queue)

(1)
template <class T, class Container>
  bool operator== (const queue<T,Container>& lhs, const queue<T,Container>& rhs);
(2)
template <class T, class Container>
  bool operator!= (const queue<T,Container>& lhs, const queue<T,Container>& rhs);
(3)
template <class T, class Container>
  bool operator<  (const queue<T,Container>& lhs, const queue<T,Container>& rhs);
(4)
template <class T, class Container>
  bool operator<= (const queue<T,Container>& lhs, const queue<T,Container>& rhs);
(5)
template <class T, class Container>
  bool operator>  (const queue<T,Container>& lhs, const queue<T,Container>& rhs);
(6)
template <class T, class Container>
  bool operator>= (const queue<T,Container>& lhs, const queue<T,Container>& rhs);
Relational operators for queue
Performs the appropriate comparison operation between lhs and rhs.

Each of these operator overloads calls the same operator on the underlying container objects.

Parameters

lhs, rhs
queue objects (to the left- and right-hand side of the operator, respectively).

Return Value

true if the condition holds, and false otherwise.

Complexity

Constant
Linear in both lhs and rhs's sizes.

Complexity

Constant (a single call to the comparison operator on the underlying containers). Although notice that this operation on the underlying containers is itself up to linear in the size of the smaller object for standard containers.

Data races

Both containers, lhs and rhs, are accessed.
Up to all of their contained elements may be accessed.

Exception safety

Provides the same level of guarantees as the operation performed on the container.

See also