24 Containers library [containers]

24.3 Sequence containers [sequences]

24.3.10 Class template list [list]

24.3.10.6 Erasure [list.erasure]

template<class T, class Allocator, class U> typename list<T, Allocator>::size_type erase(list<T, Allocator>& c, const U& value);
Effects: Equivalent to: return erase_if(c, [&](auto& elem) { 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);