Namespaces
Variants
Views
Actions

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

From cppreference.com
< cpp‎ | container‎ | queue
Revision as of 19:34, 31 May 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
template< class T, class Container >

bool operator==( queue<T,Container>& lhs,

                 queue<T,Container>& rhs );
(1)
template< class T, class Container >

bool operator!=( queue<T,Container>& lhs,

                 queue<T,Container>& rhs );
(2)
template< class T, class Container >

bool operator<( queue<T,Container>& lhs,

                queue<T,Container>& rhs );
(3)
template< class T, class Container >

bool operator<=( queue<T,Container>& lhs,

                 queue<T,Container>& rhs );
(4)
template< class T, class Container >

bool operator>( queue<T,Container>& lhs,

                queue<T,Container>& rhs );
(5)
template< class T, class Container >

bool operator>=( queue<T,Container>& lhs,

                 queue<T,Container>& rhs );
(6)

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

lhs, rhs - container adaptors whose contents to compare
-
T must meet the requirements of EqualityComparable.

[edit] Return value

true if the corresponding comparison yields true, false otherwise.

[edit] Complexity

Linear in the size of the container