When not otherwise constrained, the
BinaryPredicate parameter is used
whenever an algorithm expects a function object that, when applied
to the result of dereferencing two corresponding iterators or
to dereferencing an iterator and type
T
when
T is part of the signature,
returns a value testable as
true. If an algorithm takes
BinaryPredicate binary_pred as its argument and
first1 and
first2 as its iterator arguments
with respective value types
T1 and
T2,
the expression
binary_pred(*first1, *first2) shall be well-formed and
the type
decltype(binary_pred(*first1, *first2)) shall model
boolean-testable. Unless otherwise specified,
BinaryPredicate always takes the first iterator's
value_type
as its first argument, that is, in those cases when
T value
is part of the signature,
the expression
binary_pred(*first1, value) shall be well-formed and
the type
decltype(binary_pred(*first1, value)) shall model
boolean-testable. binary_pred shall not apply any non-constant function
through any of its arguments
. Given a glvalue
u of type (possibly const)
T1
that designates the same object as
*first1, and
a glvalue
v of type (possibly const)
T2
that designates the same object as
*first2,
binary_pred(u, *first2),
binary_pred(*first1, v), and
binary_pred(u, v)
shall each be a valid expression that is equal to
binary_pred(*first1, *first2), and
binary_pred(u, value)
shall be a valid expression that is equal to
binary_pred(*first1, value).