cppreference.com > C++ Lists > unique
unique
Syntax:
  void unique();
  void unique( BinPred pr );

The function unique() removes all duplicate elements from the list. Equality is tested using the == operator, unless pr is specified as a replacement. The ordering of the elements in a list should not change after a call to unique().

unique() runs in linear time.