I have an std::list
of structs and I would like to remove items from the list based on if a certain member variable matches a particular value.
My struct and list:
struct Foo
{
uint64_t PID;
uintptr_t addr;
};
std::list<Foo> FooList;
Code to remove entry:
uintptr_t Bar;
FooList.remove_if(???) // Remove when "Foo.addr == Bar";
I'm not sure how to reference to the struct instance inside of the remove_if()
function, any help would be appreciated!
Thanks,
Naitzirch