Header file range/v3/algorithm/binary_search.hpp

#include <range/v3/range_fwd.hpp>

#include <range/v3/begin_end.hpp>

#include <range/v3/range_concepts.hpp>

#include <range/v3/range_traits.hpp>

#include <range/v3/utility/functional.hpp>

#include <range/v3/utility/iterator_concepts.hpp>

#include <range/v3/utility/iterator_traits.hpp>

#include <range/v3/algorithm/lower_bound.hpp>

#include <range/v3/utility/static_const.hpp>

namespace ranges
{
    inline namespace v3
    {
        struct binary_search_fn;
        
        inline namespace 
        {
            constexpr auto& binary_search = static_const<with_braced_init_args<binary_search_fn>>::value;
        }
    }
}

Class ranges::v3::binary_search_fn

struct binary_search_fn
{
    template <typename I, typename S, typename V2, typename C = ordered_less, typename P = ident, int _concept_requires_43 = 42, typename std::enable_if<(_concept_requires_43==43)||(Sentinel<S, I>()&&BinarySearchable<I, V2, C, P>()), int>::type=0>
    bool operator()(I begin, S end, V2 const& val, C pred = C{}, P proj = P{}) const;
    
    template <typename Rng, typename V2, typename C = ordered_less, typename P = ident, typename I = range_iterator_t<Rng>, int _concept_requires_56 = 42, typename std::enable_if<(_concept_requires_56==43)||(Range<Rng>()&&BinarySearchable<I, V2, C, P>()), int>::type=0>
    bool operator()(Rng&& rng, V2 const& val, C pred = C{}, P proj = P{}) const;
};

@{

Function template ranges::v3::binary_search_fn::operator()<I, S, V2, C, P, _concept_requires_43>

template <typename I, typename S, typename V2, typename C = ordered_less, typename P = ident, int _concept_requires_43 = 42, typename std::enable_if<(_concept_requires_43==43)||(Sentinel<S, I>()&&BinarySearchable<I, V2, C, P>()), int>::type=0>
bool operator()(I begin, S end, V2 const& val, C pred = C{}, P proj = P{}) const;

function template \c binary_search_fn::operator()

range-based version of the \c binary_search std algorithm

Rng is a model of the Range concept



Variable ranges::v3::binary_search

constexpr auto& binary_search = static_const<with_braced_init_args<binary_search_fn>>::value;

binary_search_fn