14 #ifndef ZYPPNG_MONADIC_LIFT_H_INCLUDED 15 #define ZYPPNG_MONADIC_LIFT_H_INCLUDED 19 #include <zypp-core/ng/meta/Functional> 20 #include <zypp-core/ng/async/task.h> 21 #include <zypp-core/ng/pipelines/operators.h> 27 template <
typename LiftedFun,
typename T1,
typename T2,
typename =
void >
29 static auto execute( LiftedFun fun, std::pair<T1, T2> &&data ) {
30 return std::make_pair(
std::invoke( fun, std::move(data.first) ), std::move(data.second) );
34 template <
typename LiftedFun >
52 template<
typename Fun >
53 auto lift ( Fun && func ) {
60 #ifdef ZYPP_ENABLE_ASYNC 61 #include <zypp-core/ng/async/pipelines/lift.hpp>
static auto execute(LiftedFun fun, std::pair< T1, T2 > &&data)
std::enable_if< std::is_member_pointer< typename std::decay< Functor >::type >::value, typename std::result_of< Functor &&(Args &&...)>::type >::type invoke(Functor &&f, Args &&... args)
auto operator()(std::pair< T1, T2 > &&data)