cpp/algorithm/ranges/binary search

@1@ Checks if a projected element equivalent to appears within the range. @2@ Same as, but uses as the source range, as if using  as  and  as.

For to succeed, the range  must be at least partially ordered with respect to, i.e. it must satisfy all of the following requirements:
 * partitioned with respect to (that is, all projected elements for which the expression is  precedes all elements for which the expression is ).
 * partitioned with respect to.
 * for all elements, if is  then  is also.

A fully-sorted range meets these criteria.

Return value
if an element equal to is found,  otherwise.

Complexity
The number of comparisons and projections performed is logarithmic in the distance between and  (at most $log 2(last - first) + O(1)$ comparisons and projections). However, for iterator-sentinel pair that does not model std, number of iterator increments is linear.