cppreference.com > C++ Lists > remove_if
remove_if
Syntax:
  #include <list>
  void remove_if( UnPred pr );

The remove_if() function removes all elements from the list for which the unary predicate pr is true.

remove_if() runs in linear time.