Standard C++ Library Reference ISO/IEC (VERSION3)
list::unique
void unique();
template<class Pr2>
void unique(Pr2 pred);
The first member function removes from the controlled sequence every element that compares
equal to its preceding element. For the iterators Pi and Pj designating elements at positions I
and J, the second member function removes every element for which I + 1 == J &&
pred(*Pi, *Pj).
For a controlled sequence of length N (> 0), the predicate pred(*Pi, *Pj) is evaluated N -
1 times.
An exception occurs only if pred throws an exception. In that case, the controlled sequence is
left in an unspecified state and the exception is rethrown.
list::value_type
typedef typename Alloc::value_type value_type;
The type is a synonym for the template parameter Ty.
operator!=
template<class Ty, class Alloc>
bool operator!=(
const list <Ty, Alloc>& left,
const list <Ty, Alloc>& right);
The template function returns !(left == right).
operator==
template<class Ty, class Alloc>
bool operator==(
const list <Ty, Alloc>& left,
const list <Ty, Alloc>& right);
The template function overloads operator== to compare two objects of template class
list. The function returns left.size() == right.size() && equal(left.
begin(), left. end(), right.begin()).