[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: Creating predicates Up: The Standard Library Previous: Using member functions

Predicates

Some algorithms can be given a function to modify their behaviour. For example, the find_if algorithm can find items that conform to a particular condition as specified by a function. A predicate is a function object (an object that behaves like a function) that returns a bool showing whether or not an item matches the condition.



 

Tim Love
2001-07-05