Can predicate function be a member function of a class ?

Hello forum,

I have a stl list and I need to remove some of the elements from the list based on some condition. I am using std::remove_if(....) and the function inside the parenthesis is a member function of the class.

But I am getting the following error:

/Layer.cpp:4838: error: invalid use of non-static member function
     hilbertRasterLaserLines_.remove_if(isOverlapping);                                                     ^

Some hint would be helpful.

Topic archived. No new replies allowed.