19#ifndef SRC_XRDCL_XRDCLAPPLY_HH_
20#define SRC_XRDCL_XRDCLAPPLY_HH_
35 template <
int I,
int ... Ns>
48 template <
typename FUNC,
typename TUPL,
int ... INDICES>
50 decltype( func( std::move( std::get<INDICES>( args ) )... ) )
52 return func( std::move( std::get<INDICES>( args ) )... );
63 template <
typename FUNC,
typename ... ARGs>
64 inline static auto Apply( FUNC &&func, std::tuple<ARGs...> &tup ) ->
67 return tuple_call_impl( func, tup,
typename seq_gen<
sizeof...(ARGs)>::type{} );
79 template <
typename METH,
typename OBJ,
typename ... ARGs>
80 inline static auto Apply( METH &&method, OBJ &obj, std::tuple<ARGs...> &tup ) ->
81 decltype(
Apply( std::bind( method, &obj, std::placeholders::_1, std::placeholders::_2 ), tup ) )
83 return Apply( std::bind( method, &obj, std::placeholders::_1, std::placeholders::_2 ), tup );
Definition XrdClAction.hh:34
static auto Apply(FUNC &&func, std::tuple< ARGs... > &tup) -> decltype(tuple_call_impl(func, tup, typename seq_gen< sizeof...(ARGs)>::type{}))
Definition XrdClApply.hh:64
static auto tuple_call_impl(FUNC &func, TUPL &args, sequence< INDICES... >) -> decltype(func(std::move(std::get< INDICES >(args))...))
Definition XrdClApply.hh:49
typename seq_gen< I - 1, I - 1, Ns... >::type type
Definition XrdClApply.hh:38
Definition XrdClApply.hh:32
Definition XrdClApply.hh:29