libfilezilla
Namespaces | Functions
apply.hpp File Reference

Template helper to call a function with its arguments extracted from a tuple. More...

#include <cstddef>
#include <utility>
#include <tuple>
#include <type_traits>
Include dependency graph for apply.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 fz
 The namespace used by libfilezilla.
 

Functions

template<typename Obj , typename F , typename Tuple , typename Seq = typename std::make_index_sequence<std::tuple_size_v<typename std::remove_reference_t<Tuple>>>>
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. More...
 

Detailed Description

Template helper to call a function with its arguments extracted from a tuple.

This helper is used for the event dispatch

Similar to like std::experimental::apply