Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
STL Containers
bitset
deque
list
map
multimap
multiset
priority_queue
queue
set
stack
vector
list
comparison operators
list::list
list::~list
member functions:
list::assign
list::back
list::begin
list::clear
list::empty
list::end
list::erase
list::front
list::get_allocator
list::insert
list::max_size
list::merge
list::operator=
list::pop_back
list::pop_front
list::push_back
list::push_front
list::rbegin
list::remove
list::remove_if
list::rend
list::resize
list::reverse
list::size
list::sort
list::splice
list::swap
list::unique


comparison operators

function
<list>
template <class T, class Allocator>
  bool operator== ( const list<T,Allocator>& x, const list<T,Allocator>& y );
template <class T, class Allocator>
  bool operator< ( const list<T,Allocator>& x, const list<T,Allocator>& y );
template <class T, class Allocator>
  bool operator!= ( const list<T,Allocator>& x, const list<T,Allocator>& y );
template <class T, class Allocator>
  bool operator> ( const list<T,Allocator>& x, const list<T,Allocator>& y );
template <class T, class Allocator>
  bool operator>= ( const list<T,Allocator>& x, const list<T,Allocator>& y );
template <class T, class Allocator>
  bool operator<= ( const list<T,Allocator>& x, const list<T,Allocator>& y );

Global comparison operator functions

These overloaded global operator functions perform the appropriate comparison operation between list containers x and y.

Operations == and != are performed by comparing the elements using algorithm equal.

Operations <, >, <= and >= are performed by using algorithm lexicographical_compare, which requires that the type of the elements (T) has the < operation (less-than) defined between two objects of that type.

These operators are overloaded in header <list>.

Parameters

x, y
list containers, having both the same template parameters (T and Allocator).

Return Value

true if the condition holds, and false otherwise.