Commit cb5fae41 authored by Edwin Carlinet's avatar Edwin Carlinet

BUGFIX #69

Calls to ``::ranges::views::filter(rng, func)`` were ambiguous with the overload
``::ranges::views::filter(Predicate, Projector)``

Calls are replaced by the non-conflicting declaration ``::ranges::cpp20::views::filter``.
parent a879c53d
Pipeline #21583 passed with stages
in 31 minutes and 15 seconds
......@@ -19,7 +19,7 @@ namespace mln::ranges::view
template <::ranges::cpp20::range Rng, class Fun>
[[gnu::always_inline]] inline auto filter(Rng&& rng, Fun&& fun)
{
return ::ranges::views::filter(std::forward<Rng>(rng), std::forward<Fun>(fun));
return ::ranges::cpp20::views::filter(std::forward<Rng>(rng), std::forward<Fun>(fun));
}
} // namespace mln::ranges::view
......@@ -172,8 +172,8 @@ namespace mln::ranges
static_assert(::ranges::predicate<Pred, mln::ranges::mdrange_value_t<Rng>...>);
auto z = ::ranges::views::zip(std::forward<Rng>(ranges)...);
auto f = ::ranges::views::filter(z, [pred = std::move(pred_fn)](auto&& t) { return std::apply(pred, t); });
auto m = ::ranges::views::transform(
auto f = ::ranges::cpp20::views::filter(z, [pred = std::move(pred_fn)](auto&& t) { return std::apply(pred, t); });
auto m = ::ranges::cpp20::views::transform(
z, [f = std::move(map_fn)](auto&& t) -> decltype(auto) { return std::apply(f, t); });
return m;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment