1class Anything{
2public: int func() };
3
4list<Anything> lst = <some_elements>;
5
6//removes every element in list that returned true in line 9
7lst.erase(std::remove_if(lst.begin(), lst.end(),
8 [&](const Anything lst)-> bool
9 { return lst.func() == something; }), //any condition
10 lst.end());