1 #ifndef LIBFILEZILLA_APPLY_HEADER
2 #define LIBFILEZILLA_APPLY_HEADER
22 template<
typename Obj,
typename F,
typename Tuple,
size_t... I>
23 auto apply_(Obj&& obj, F&& f, Tuple&& t, std::index_sequence<I...>
const&) -> decltype((std::forward<Obj>(obj)->*std::forward<F>(f))(std::get<I>(std::forward<Tuple>(t))...))
25 return (std::forward<Obj>(obj)->*std::forward<F>(f))(std::get<I>(std::forward<Tuple>(t))...);
47 template<typename Obj, typename F, typename Tuple, typename Seq = typename std::make_index_sequence<std::tuple_size<typename std::remove_reference<Tuple>::type>::value>>
48 auto apply(Obj&& obj, F && f, Tuple&& args) -> decltype(apply_(std::forward<Obj>(obj), std::forward<F>(f), std::forward<Tuple>(args), Seq()))
50 return apply_(std::forward<Obj>(obj), std::forward<F>(f), std::forward<Tuple>(args), Seq());