From 37bcbe7917223a5dbc6a0469735a6345b113a63a Mon Sep 17 00:00:00 2001 From: Mitsuru Kariya Date: Mon, 2 Sep 2013 22:47:15 +0900 Subject: [PATCH] [algorithm.binary_search] Use comp parameter for lower_bound. --- sprout/algorithm/binary_search.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sprout/algorithm/binary_search.hpp b/sprout/algorithm/binary_search.hpp index 1f26691d..cebc45fd 100644 --- a/sprout/algorithm/binary_search.hpp +++ b/sprout/algorithm/binary_search.hpp @@ -11,7 +11,7 @@ #include #include #include -#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT +#include namespace sprout { namespace detail { @@ -30,16 +30,13 @@ namespace sprout { template inline SPROUT_CONSTEXPR bool binary_search(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) { - return sprout::detail::binary_search_impl(sprout::lower_bound(first, last, value), last, value, comp); + return sprout::detail::binary_search_impl(sprout::lower_bound(first, last, value, comp), last, value, comp); } template inline SPROUT_CONSTEXPR bool binary_search(ForwardIterator first, ForwardIterator last, T const& value) { - return sprout::binary_search( - first, last, value, - NS_SSCRISK_CEL_OR_SPROUT::less::value_type>() - ); + return sprout::binary_search(first, last, value, sprout::less<>()); } } // namespace sprout