For the rest of this book, when a unary predicate function is required, it will be notated using the type UnPred . When a binary predicate is required, the type BinPred will be used. In a binary predicate, the arguments are always in the order of first,second. For both unary and binary predicates, the arguments will contain values of the type of objects being stored by the container. Some algorithms use a special type of binary predicate that compares two elements.
Comparison functions return true if their first argument is less than their second.
Comparison functions will be notated using the type Comp . Two other entities that populate the STL are binders and negators. A binder binds an argument to a function object. A negator returns the complement of a predicate. Of course, constant time is better than linear time, which is better than logarithmic time.