Range-v3 Range algorithms, views, and actions for the Standard Library |

Public Member Functions | List of all members
ranges::binary_search_fn Struct Reference
Algorithms

## Public Member Functions
template<typename I , typename S , typename V , typename C = less, typename P = identity>
auto | operator() (I begin, S end, V const &val, C pred=C{}, P proj=P{}) const -> bool requires forward_iterator< I > &&sentinel_for< S, I > &&indirect_strict_weak_order< C, V const *, projected< I, P >>
| function template `binary_search_fn::operator()` More...
template<typename Rng , typename V , typename C = less, typename P = identity>
auto | operator() (Rng &&rng, V const &val, C pred=C{}, P proj=P{}) const -> bool requires forward_range< Rng > &&indirect_strict_weak_order< C, V const *, projected< iterator_t< Rng >, P >>
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## Member Function Documentation

## ◆ operator()()

template<typename I , typename S , typename V , typename C = less, typename P = identity>

auto ranges::binary_search_fn::operator() | ( | I | begin,
|  | S | end,
|  | V const & | val,
|  | C | pred = `C{}`,
|  | P | proj = `P{}`
| ) |  | const -> bool requires forward_iterator<I> && sentinel_for<S, I> && indirect_strict_weak_order<C, V const *, projected<I, P>>

function template `binary_search_fn::operator()`

range-based version of the `binary_search` std algorithm

Precondition
  `Rng` is a model of the `Range` concept