Does a call of unique() on a list also resize the list if repeats are found?
Yes, it does. It removes the duplicate elements. So the size of the list changes as well.
Have a look at the documentation here. It says:
The elements removed have their destructors called and their iterators and references become invalid.
Note that in case of std::list, while erasing an element, only the iterators and references to the erased element are invalidated [23.2.2.3/3].
std::unique
, I suppose - visitor 2012-04-04 09:02