23 Containers library [containers]

23.3 Sequence containers [sequences]

23.3.9 Class template list [list]

23.3.9.6 Erasure [list.erasure]

template<class T, class Allocator, class U = T> typename list<T, Allocator>::size_type erase(list<T, Allocator>& c, const U& value);
Effects: Equivalent to: return erase_if(c, [&](const auto& elem) -> bool { return elem == value; });
template<class T, class Allocator, class Predicate> typename list<T, Allocator>::size_type erase_if(list<T, Allocator>& c, Predicate pred);
Effects: Equivalent to: return c.remove_if(pred);