8#ifndef ADOBE_ALGORITHM_LOWER_BOUND_HPP
9#define ADOBE_ALGORITHM_LOWER_BOUND_HPP
18#include <boost/next_prior.hpp>
19#include <boost/range/begin.hpp>
20#include <boost/range/end.hpp>
21#include <boost/utility/enable_if.hpp>
28namespace implementation {
38I lower_bound_n_(I f, N n,
const T& x, C c, P p) {
41 I m = boost::next(f, h);
85 return implementation::lower_bound_n_(
86 f, n, x, std::bind(c, std::placeholders::_1, std::placeholders::_2),
identity<T>());
98 return implementation::lower_bound_n_(
99 f, n, x, std::bind(c, std::placeholders::_1, std::placeholders::_2),
100 std::bind(p, std::placeholders::_1));
121 return std::lower_bound(f, l, x);
131 return std::lower_bound(f, l, x, std::bind(c, std::placeholders::_1, std::placeholders::_2));
151inline typename boost::lazy_disable_if<std::is_same<I, T>, boost::range_iterator<I>>
::type
162inline typename boost::lazy_disable_if<std::is_same<I, T>, boost::range_const_iterator<I>>
::type
173template <
class ForwardRange,
class T>
174inline typename boost::range_iterator<ForwardRange>::type
lower_bound(ForwardRange& range,
176 return std::lower_bound(boost::begin(range), boost::end(range), value);
184template <
class ForwardRange,
class T>
185inline typename boost::range_const_iterator<ForwardRange>::type
187 return std::lower_bound(boost::begin(range), boost::end(range), value);
200template <
typename I,
class T,
class Compare>
201inline typename boost::lazy_disable_if<std::is_same<I, T>, boost::range_iterator<I>>
::type
211template <
class I,
class T,
class Compare>
212inline typename boost::lazy_disable_if<std::is_same<I, T>, boost::range_const_iterator<I>>
::type
I lower_bound(I f, I l, const T &x)
I lower_bound_n(I f, N n, const T &x)