There are operator classes in STL like less, equal_to, greater_equal etc. How to easily combine them to use with for example remove_if function?
For example I want to remove in vector elements which are greater than 0 AND less than 3 AND not equal to 2, then it would be something like:
remove_if (v.begin(), v.end(), bind2nd(greater<int>(),0) + bind2nd(less<int>(),3) + not1(bind2nd(equal_to<int>(), 2)));
User during running of program can specify filtering options for example he can write: remove if x > 0 && x < 3 && x != 2, or he can write: remove if x > 5 || x == 3. Then command is parsed and appropriate operators with their arguments are combined together to one predicate.