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

Fix unit test

parent bf0a279e
Pipeline #12907 failed with stages
in 7 minutes and 18 seconds
......@@ -32,12 +32,10 @@ namespace mln
class domain_type : ::ranges::view_base
{
using pred_t = ::ranges::semiregular_t<F>;
using fun_t = ::ranges::composed<pred_t, std::reference_wrapper<I>>; // f o I::operator()
using dom_t = decltype(std::declval<I*>()->domain());
using rng_t = mln::ranges::remove_if_view<::ranges::view::all_t<dom_t>, ::ranges::logical_negate<fun_t>>;
using fun_t = ::ranges::composed<F, std::reference_wrapper<I>>; // f o I::operator()
using dom_t = decltype(std::declval<I*>()->domain());
using rng_t = mln::ranges::remove_if_view<::ranges::view::all_t<dom_t>, ::ranges::logical_negate<fun_t>>;
pred_t m_pred;
fun_t m_fun;
dom_t m_dom;
mutable rng_t m_rng; // domain can be a range, so non-const
......@@ -50,8 +48,7 @@ namespace mln
using reference = ::ranges::range_reference_t<rng_t>;
domain_type(I* ima, F f)
: m_pred(std::move(f))
, m_fun(m_pred, std::ref(*ima))
: m_fun(std::move(f), std::ref(*ima))
, m_dom(ima->domain())
, m_rng(mln::ranges::view::filter(::ranges::view::all(m_dom), m_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