The function unique is used to remove all adjacent duplicates.
template<class ForwardIterator> ForwardIterator unique (ForwardIterator first, ForwardIterator last); template<class ForwardIterator, class BinaryPredicate> ForwardIterator unique (ForwardIterator first, ForwardIterator last, BinaryPredicate pred);
The end of the resulting range is returned.