How do I use remove_if?
Posted on 2002-05-23
I want to remove elements from an STL list. For each element on the list (which are pointers), I can use "item->GetState()->IsDeleted()" to check if I need to delete it. How do I make use of that to delete all such items?
All I could find about remove_if are examples that use integers, and put "bind2nd(less_equal<int>(), 10)" in the function call. I understand the general idea of this, but not exactly what it does, so I have no idea how to apply this to what I want to do.