list::remove

void remove(const T& x);

The member function removes from the controlled sequence all elements, designated by the iterator P, for which *P == x.