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. In other words,
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,
it should work correctly in the construct
binary_pred(*first1, *first2) contextually converted to
bool (
[conv])
. 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, it should work correctly in the construct
binary_pred(*first1, value) contextually converted to
bool (
[conv])
. binary_pred shall not apply any non-constant function
through the dereferenced iterators
. 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).