Wednesday, January 11, 2012

stl predicate

stl predicate:

A special kind of auxiliary function for algorithms is a predicate. Predicates are functions that return a Boolean value. They are often used to specify a sorting or a search criterion. Depending on their purpose, predicates are unary or binary. Note that not every unary or binary function that returns a Boolean value is a valid predicate. The STL requires that predicates always yield the same result for the same value. This rules out functions that modify their internal state when they are called. 
  1. Unary Predicates
  2. Binary Predicates
See Also:

No comments:

Post a Comment