Commit 6e3645fa authored by Michaël Roynard's avatar Michaël Roynard
Browse files

concept checking

parent bda9d0d5
Pipeline #12420 passed with stages
in 13 minutes and 27 seconds
......@@ -162,10 +162,23 @@ namespace mln::ranges
return {::ranges::view::all(static_cast<Rng&&>(rng)), std::move(fun)};
}
// TODO: concept checking
template <typename Rng1, typename Rng2, typename Fun, CONCEPT_REQUIRES_(Concept2<Rng1, Rng2, Fun>())>
transform2_view<::ranges::view::all_t<Rng1>, ::ranges::view::all_t<Rng2>, Fun>
operator()(Rng1&& rng1, Rng2&& rng2, Fun fun) const
#ifdef PYLENE_CONCEPT_TS_ENABLED
// clang-format off
requires mln::concepts::stl::InputRange<Rng1> &&
mln::concepts::stl::InputRange<Rng2> &&
mln::concepts::stl::CopyConstructible<Fun> &&
mln::concepts::stl::Invocable<Fun&,
::ranges::range_reference_t<Rng1>,
::ranges::range_reference_t<Rng2>> &&
not mln::concepts::stl::Same<void,
std::invoke_result_t<Fun&,
::ranges::range_reference_t<Rng1>,
::ranges::range_reference_t<Rng2>>>
#endif // PYLENE_CONCEPT_TS_ENABLED
transform2_view<::ranges::view::all_t<Rng1>, ::ranges::view::all_t<Rng2>, Fun> operator()(
Rng1&& rng1, Rng2&& rng2, Fun fun) const
// clang-format on
{
return {::ranges::view::all(static_cast<Rng1&&>(rng1)), ::ranges::view::all(static_cast<Rng2&&>(rng2)),
std::move(fun)};
......
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