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_v<
typename std::remove_reference_t<Tuple>>>>
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());
The namespace used by libfilezilla.
Definition: apply.hpp:17
auto apply(Obj &&obj, F &&f, Tuple &&args) -> decltype(apply_(std::forward< Obj >(obj), std::forward< F >(f), std::forward< Tuple >(args), Seq()))
Apply tuple to pointer to member.
Definition: apply.hpp:48