28 #ifndef TWEENY_DISPATCHER_H
29 #define TWEENY_DISPATCHER_H
35 template<
int ...>
struct seq { };
36 template<
int N,
int ...S>
struct gens : gens<N - 1, N - 1, S...> { };
37 template<
int ...S>
struct gens<0, S...> {
38 typedef seq<S...> type;
41 template<
typename R,
typename Func,
typename TupleType,
int ...S>
42 R dispatch(Func && f, TupleType && args, seq<S...>) {
43 return f(std::get<S>(args) ...);
46 template<
typename R,
typename Func,
typename... Ts>
47 R call(Func && f,
const std::tuple<Ts...> & args) {
48 return dispatch<R>(f, args,
typename gens<
sizeof...(Ts)>::type());
The tweeny namespace contains all symbols and names for the Tweeny library.
Definition: MANUAL.dox:1