Effects: Erases all but the first element from every consecutive
group of equal elements referred to by the iterator i in the range [first +1, last) for which *i ==*(i-1) (for the version with no arguments) or pred(*i,
*(i -1)) (for the version with a predicate argument) holds.
Invalidates only the iterators and references to the erased elements.
Preconditions: *this and x are both sorted with respect to
the comparator operator< (for the first two overloads) or
comp (for the last two overloads), and
get_allocator()== x.get_allocator() is true.