template<typename ForwardIterator, typename T>
inline SPROUT_CONSTEXPR bool
binary_search(ForwardIterator first, ForwardIterator last, T const& value);
template<typename ForwardIterator, typename T, typename Compare>
inline SPROUT_CONSTEXPR bool
binary_search(ForwardIterator first, ForwardIterator last, T const& value, Compare comp);
#include <sprout/algorithm/binary_search.hpp>
#include <sprout/array.hpp>
#include <sprout/container.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 5, 5, 5, 5, 8, 9, 10}};
SPROUT_STATIC_CONSTEXPR auto result = sprout::binary_search(begin(input), end(input), 5);
static_assert(result, "found 5 by binary search.");