|
@@ -5,37 +5,12 @@
|
|
|
#include <algorithm>
|
|
|
#include <string_view>
|
|
|
|
|
|
-#include "../algorithm/traits.hpp" // support::is_range_v
|
|
|
+#include "traits.hpp" // support::is_range_v
|
|
|
#include "../function_utils.hpp" // support::invoke
|
|
|
+#include "adl_helper.hpp" // adl_helper::adl_begin adl_helper::adl_end
|
|
|
|
|
|
namespace simple::support
|
|
|
{
|
|
|
- //TODO: all noexcepts bellow should account for return value construction
|
|
|
-
|
|
|
- namespace detail // TODO: rename to adl_helper
|
|
|
- {
|
|
|
- using std::begin;
|
|
|
- using std::end;
|
|
|
-
|
|
|
- // TODO: should these return decltype(auto)?
|
|
|
- template <typename Range,
|
|
|
- std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
- constexpr auto adl_begin(Range&& range)
|
|
|
- noexcept(noexcept(begin(std::forward<Range>(range))))
|
|
|
- {
|
|
|
- return begin(std::forward<Range>(range));
|
|
|
- }
|
|
|
-
|
|
|
- template <typename Range,
|
|
|
- std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
- constexpr auto adl_end(Range&& range)
|
|
|
- noexcept(noexcept(end(std::forward<Range>(range))))
|
|
|
- {
|
|
|
- return end(std::forward<Range>(range));
|
|
|
- }
|
|
|
-
|
|
|
- } // namespace detail
|
|
|
-
|
|
|
|
|
|
// TODO: check if string view has begin-end constructor(should since c++20) and replace this with a deprecated alias
|
|
|
class string_view : public std::string_view
|
|
@@ -47,77 +22,78 @@ namespace simple::support
|
|
|
{}
|
|
|
};
|
|
|
|
|
|
+ //TODO: all noexcepts bellow should account for return value construction
|
|
|
|
|
|
template <typename Range,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto min_element(Range& range)
|
|
|
- noexcept(noexcept(std::min_element(detail::adl_begin(range), detail::adl_end(range))))
|
|
|
+ noexcept(noexcept(std::min_element(adl_helper::adl_begin(range), adl_helper::adl_end(range))))
|
|
|
{
|
|
|
- return std::min_element(detail::adl_begin(range), detail::adl_end(range));
|
|
|
+ return std::min_element(adl_helper::adl_begin(range), adl_helper::adl_end(range));
|
|
|
}
|
|
|
|
|
|
template <typename Range,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto min_element(Range&& range)
|
|
|
- noexcept(noexcept(std::min_element(detail::adl_begin(range), detail::adl_end(range))))
|
|
|
+ noexcept(noexcept(std::min_element(adl_helper::adl_begin(range), adl_helper::adl_end(range))))
|
|
|
{
|
|
|
- return *std::min_element(detail::adl_begin(range), detail::adl_end(range));
|
|
|
+ return *std::min_element(adl_helper::adl_begin(range), adl_helper::adl_end(range));
|
|
|
}
|
|
|
|
|
|
template <typename Range,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto max_element(Range& range)
|
|
|
- noexcept(noexcept(std::max_element(detail::adl_begin(range), detail::adl_end(range))))
|
|
|
+ noexcept(noexcept(std::max_element(adl_helper::adl_begin(range), adl_helper::adl_end(range))))
|
|
|
{
|
|
|
- return std::max_element(detail::adl_begin(range), detail::adl_end(range));
|
|
|
+ return std::max_element(adl_helper::adl_begin(range), adl_helper::adl_end(range));
|
|
|
}
|
|
|
|
|
|
template <typename Range,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto max_element(Range&& range)
|
|
|
- noexcept(noexcept(std::max_element(detail::adl_begin(range), detail::adl_end(range))))
|
|
|
+ noexcept(noexcept(std::max_element(adl_helper::adl_begin(range), adl_helper::adl_end(range))))
|
|
|
{
|
|
|
- return *std::max_element(detail::adl_begin(range), detail::adl_end(range));
|
|
|
+ return *std::max_element(adl_helper::adl_begin(range), adl_helper::adl_end(range));
|
|
|
}
|
|
|
|
|
|
template <typename Range, typename Compare,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto min_element(Range& range, Compare comp)
|
|
|
- noexcept(noexcept(std::min_element(detail::adl_begin(range), detail::adl_end(range), std::move(comp))))
|
|
|
+ noexcept(noexcept(std::min_element(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(comp))))
|
|
|
{
|
|
|
- return std::min_element(detail::adl_begin(range), detail::adl_end(range), std::move(comp));
|
|
|
+ return std::min_element(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(comp));
|
|
|
}
|
|
|
|
|
|
template <typename Range, typename Compare,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto min_element(Range&& range, Compare comp)
|
|
|
- noexcept(noexcept(std::min_element(detail::adl_begin(range), detail::adl_end(range), std::move(comp))))
|
|
|
+ noexcept(noexcept(std::min_element(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(comp))))
|
|
|
{
|
|
|
- return *std::min_element(detail::adl_begin(range), detail::adl_end(range), std::move(comp));
|
|
|
+ return *std::min_element(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(comp));
|
|
|
}
|
|
|
|
|
|
template <typename Range, typename Compare,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto max_element(Range& range, Compare comp)
|
|
|
- noexcept(noexcept(std::max_element(detail::adl_begin(range), detail::adl_end(range), std::move(comp))))
|
|
|
+ noexcept(noexcept(std::max_element(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(comp))))
|
|
|
{
|
|
|
- return std::max_element(detail::adl_begin(range), detail::adl_end(range), std::move(comp));
|
|
|
+ return std::max_element(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(comp));
|
|
|
}
|
|
|
|
|
|
template <typename Range, typename Compare,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto max_element(Range&& range, Compare comp)
|
|
|
- noexcept(noexcept(std::max_element(detail::adl_begin(range), detail::adl_end(range), std::move(comp))))
|
|
|
+ noexcept(noexcept(std::max_element(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(comp))))
|
|
|
{
|
|
|
- return *std::max_element(detail::adl_begin(range), detail::adl_end(range), std::move(comp));
|
|
|
+ return *std::max_element(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(comp));
|
|
|
}
|
|
|
|
|
|
template <typename Range, typename UnaryPredicate,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto all_of(const Range& range, UnaryPredicate p)
|
|
|
- noexcept(noexcept(std::all_of(detail::adl_begin(range), detail::adl_end(range), std::move(p))))
|
|
|
+ noexcept(noexcept(std::all_of(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p))))
|
|
|
{
|
|
|
- return std::all_of(detail::adl_begin(range), detail::adl_end(range), std::move(p));
|
|
|
+ return std::all_of(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p));
|
|
|
}
|
|
|
template <typename ExecutionPolicy, typename Range, typename UnaryPredicate,
|
|
|
// TODO: use std::is_execution_policy_v when it stops depending on external tbb
|
|
@@ -125,18 +101,18 @@ namespace simple::support
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto all_of(ExecutionPolicy&& policy, const Range& range, UnaryPredicate p)
|
|
|
noexcept(noexcept(std::all_of(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), std::move(p))))
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p))))
|
|
|
{
|
|
|
return std::all_of(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), std::move(p));
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p));
|
|
|
}
|
|
|
|
|
|
template <typename Range, typename UnaryPredicate,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto any_of(const Range& range, UnaryPredicate p)
|
|
|
- noexcept(noexcept(std::any_of(detail::adl_begin(range), detail::adl_end(range), std::move(p))))
|
|
|
+ noexcept(noexcept(std::any_of(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p))))
|
|
|
{
|
|
|
- return std::any_of(detail::adl_begin(range), detail::adl_end(range), std::move(p));
|
|
|
+ return std::any_of(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p));
|
|
|
}
|
|
|
template <typename ExecutionPolicy, typename Range, typename UnaryPredicate,
|
|
|
// TODO: use std::is_execution_policy_v when it stops depending on external tbb
|
|
@@ -144,18 +120,18 @@ namespace simple::support
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto any_of(ExecutionPolicy&& policy, const Range& range, UnaryPredicate p)
|
|
|
noexcept(noexcept(std::any_of(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), std::move(p))))
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p))))
|
|
|
{
|
|
|
return std::any_of(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), std::move(p));
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p));
|
|
|
}
|
|
|
|
|
|
template <typename Range, typename UnaryPredicate,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto none_of(const Range& range, UnaryPredicate p)
|
|
|
- noexcept(noexcept(std::none_of(detail::adl_begin(range), detail::adl_end(range), std::move(p))))
|
|
|
+ noexcept(noexcept(std::none_of(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p))))
|
|
|
{
|
|
|
- return std::none_of(detail::adl_begin(range), detail::adl_end(range), std::move(p));
|
|
|
+ return std::none_of(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p));
|
|
|
}
|
|
|
template <typename ExecutionPolicy, typename Range, typename UnaryPredicate,
|
|
|
// TODO: use std::is_execution_policy_v when it stops depending on external tbb
|
|
@@ -163,10 +139,10 @@ namespace simple::support
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto none_of(ExecutionPolicy&& policy, const Range& range, UnaryPredicate p)
|
|
|
noexcept(noexcept(std::none_of(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), std::move(p))))
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p))))
|
|
|
{
|
|
|
return std::none_of(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), std::move(p));
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p));
|
|
|
}
|
|
|
|
|
|
template <typename ExecutionPolicy, typename Range, typename OutIt, typename UnaryPredicate,
|
|
@@ -176,19 +152,19 @@ namespace simple::support
|
|
|
constexpr auto copy_if(ExecutionPolicy&& policy, const Range& range, UnaryPredicate p, OutIt out)
|
|
|
noexcept(noexcept(
|
|
|
std::copy_if(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), out, std::move(p))
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), out, std::move(p))
|
|
|
))
|
|
|
{
|
|
|
return std::copy_if(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), out, std::move(p));
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), out, std::move(p));
|
|
|
}
|
|
|
|
|
|
template <typename Range, typename OutIt, typename UnaryPredicate,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto copy_if(const Range& range, UnaryPredicate p, OutIt out)
|
|
|
- noexcept(noexcept(std::copy_if(detail::adl_begin(range), detail::adl_end(range), out, std::move(p))))
|
|
|
+ noexcept(noexcept(std::copy_if(adl_helper::adl_begin(range), adl_helper::adl_end(range), out, std::move(p))))
|
|
|
{
|
|
|
- return std::copy_if(detail::adl_begin(range), detail::adl_end(range), out, std::move(p));
|
|
|
+ return std::copy_if(adl_helper::adl_begin(range), adl_helper::adl_end(range), out, std::move(p));
|
|
|
}
|
|
|
|
|
|
template <typename ExecutionPolicy, typename Range, typename OutIt,
|
|
@@ -198,19 +174,19 @@ namespace simple::support
|
|
|
constexpr auto copy(ExecutionPolicy&& policy, const Range& range, OutIt out)
|
|
|
noexcept(noexcept(
|
|
|
std::copy(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), out)
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), out)
|
|
|
))
|
|
|
{
|
|
|
return std::copy(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), out);
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), out);
|
|
|
}
|
|
|
|
|
|
template <typename Range, typename OutIt,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto copy(const Range& range, OutIt out)
|
|
|
- noexcept(noexcept(std::copy(detail::adl_begin(range), detail::adl_end(range), out)))
|
|
|
+ noexcept(noexcept(std::copy(adl_helper::adl_begin(range), adl_helper::adl_end(range), out)))
|
|
|
{
|
|
|
- return std::copy(detail::adl_begin(range), detail::adl_end(range), out);
|
|
|
+ return std::copy(adl_helper::adl_begin(range), adl_helper::adl_end(range), out);
|
|
|
}
|
|
|
|
|
|
template <typename ExecutionPolicy, typename Range, typename It, typename OutIt, typename BinaryOperation,
|
|
@@ -220,12 +196,12 @@ namespace simple::support
|
|
|
constexpr auto transform(ExecutionPolicy&& policy, const Range& range, It it, BinaryOperation op, OutIt out)
|
|
|
noexcept(noexcept(
|
|
|
std::transform(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range),
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range),
|
|
|
it, out, std::move(op))
|
|
|
))
|
|
|
{
|
|
|
return std::transform(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range),
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range),
|
|
|
it, out, std::move(op));
|
|
|
}
|
|
|
|
|
@@ -233,11 +209,11 @@ namespace simple::support
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto transform(const Range& range, It it, BinaryOperation op, OutIt out)
|
|
|
noexcept(noexcept(
|
|
|
- std::transform(detail::adl_begin(range), detail::adl_end(range),
|
|
|
+ std::transform(adl_helper::adl_begin(range), adl_helper::adl_end(range),
|
|
|
it, out, std::move(op))
|
|
|
))
|
|
|
{
|
|
|
- return std::transform(detail::adl_begin(range), detail::adl_end(range),
|
|
|
+ return std::transform(adl_helper::adl_begin(range), adl_helper::adl_end(range),
|
|
|
it, out, std::move(op));
|
|
|
}
|
|
|
|
|
@@ -248,12 +224,12 @@ namespace simple::support
|
|
|
constexpr auto transform(ExecutionPolicy&& policy, const Range& range, UnaryOperation op, OutIt out)
|
|
|
noexcept(noexcept(
|
|
|
std::transform(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range),
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range),
|
|
|
out, std::move(op))
|
|
|
))
|
|
|
{
|
|
|
return std::transform(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range),
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range),
|
|
|
out, std::move(op));
|
|
|
}
|
|
|
|
|
@@ -261,11 +237,11 @@ namespace simple::support
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto transform(const Range& range, UnaryOperation op, OutIt out)
|
|
|
noexcept(noexcept(
|
|
|
- std::transform(detail::adl_begin(range), detail::adl_end(range),
|
|
|
+ std::transform(adl_helper::adl_begin(range), adl_helper::adl_end(range),
|
|
|
out, std::move(op))
|
|
|
))
|
|
|
{
|
|
|
- return std::transform(detail::adl_begin(range), detail::adl_end(range),
|
|
|
+ return std::transform(adl_helper::adl_begin(range), adl_helper::adl_end(range),
|
|
|
out, std::move(op));
|
|
|
}
|
|
|
|
|
@@ -278,21 +254,21 @@ namespace simple::support
|
|
|
constexpr auto find_if(ExecutionPolicy&& policy, const Range& range, UnaryPredicate p)
|
|
|
noexcept(noexcept(
|
|
|
std::find_if(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), std::move(p))
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p))
|
|
|
))
|
|
|
{
|
|
|
return std::find_if(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), std::move(p));
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p));
|
|
|
}
|
|
|
|
|
|
template <typename Range, typename UnaryPredicate,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto find_if(const Range& range, UnaryPredicate p)
|
|
|
noexcept(noexcept(
|
|
|
- std::find_if(detail::adl_begin(range), detail::adl_end(range), std::move(p))
|
|
|
+ std::find_if(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p))
|
|
|
))
|
|
|
{
|
|
|
- return std::find_if(detail::adl_begin(range), detail::adl_end(range), std::move(p));
|
|
|
+ return std::find_if(adl_helper::adl_begin(range), adl_helper::adl_end(range), std::move(p));
|
|
|
}
|
|
|
|
|
|
template <typename ExecutionPolicy, typename Range, typename Value,
|
|
@@ -302,21 +278,21 @@ namespace simple::support
|
|
|
constexpr auto find(ExecutionPolicy&& policy, const Range& range, const Value& value)
|
|
|
noexcept(noexcept(
|
|
|
std::find(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), value)
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), value)
|
|
|
))
|
|
|
{
|
|
|
return std::find(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), value);
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), value);
|
|
|
}
|
|
|
|
|
|
template <typename Range, typename Value,
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto find(const Range& range, const Value& value)
|
|
|
noexcept(noexcept(
|
|
|
- std::find(detail::adl_begin(range), detail::adl_end(range), value)
|
|
|
+ std::find(adl_helper::adl_begin(range), adl_helper::adl_end(range), value)
|
|
|
))
|
|
|
{
|
|
|
- return std::find(detail::adl_begin(range), detail::adl_end(range), value);
|
|
|
+ return std::find(adl_helper::adl_begin(range), adl_helper::adl_end(range), value);
|
|
|
}
|
|
|
|
|
|
template <typename ExecutionPolicy, typename Range, typename Value, typename BinaryPredicate,
|
|
@@ -326,12 +302,12 @@ namespace simple::support
|
|
|
constexpr auto find(ExecutionPolicy&& policy, const Range& range, const Value& v, BinaryPredicate&& p)
|
|
|
noexcept(noexcept(
|
|
|
std::find(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range), v),
|
|
|
- support::invoke(std::forward<BinaryPredicate>(p), *detail::adl_begin(range), v)
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range), v),
|
|
|
+ support::invoke(std::forward<BinaryPredicate>(p), *adl_helper::adl_begin(range), v)
|
|
|
))
|
|
|
{
|
|
|
return std::find_if(std::forward<ExecutionPolicy>(policy),
|
|
|
- detail::adl_begin(range), detail::adl_end(range),
|
|
|
+ adl_helper::adl_begin(range), adl_helper::adl_end(range),
|
|
|
[&](auto&& x) { return support::invoke(std::forward<BinaryPredicate>(p), x, v); }
|
|
|
);
|
|
|
}
|
|
@@ -340,11 +316,11 @@ namespace simple::support
|
|
|
std::enable_if_t<is_range_v<Range>>* = nullptr>
|
|
|
constexpr auto find(const Range& range, const Value& v, BinaryPredicate&& p)
|
|
|
noexcept(noexcept(
|
|
|
- std::find(detail::adl_begin(range), detail::adl_end(range), v),
|
|
|
- support::invoke(std::forward<BinaryPredicate>(p), *detail::adl_begin(range), v)
|
|
|
+ std::find(adl_helper::adl_begin(range), adl_helper::adl_end(range), v),
|
|
|
+ support::invoke(std::forward<BinaryPredicate>(p), *adl_helper::adl_begin(range), v)
|
|
|
))
|
|
|
{
|
|
|
- return std::find_if(detail::adl_begin(range), detail::adl_end(range),
|
|
|
+ return std::find_if(adl_helper::adl_begin(range), adl_helper::adl_end(range),
|
|
|
[&](auto&& x) { return support::invoke(std::forward<BinaryPredicate>(p), x, v); }
|
|
|
);
|
|
|
}
|