24.7 Standard Function Objects, Predicates, and
Binders (cont.)
- negator - another category of binder
- not1 takes a unary predicate, inverts the result
- not2 takes a binary predicate, inverts the result
- E.g., find the first non-negative number:
list<int>::iterator first_positive =
find_if( a.begin(), a.end(),
not1( bind2nd( less<int>(), 0 )) );
prev
|top
|next