So I'm given a std::tuple<T...>
, and I want to create a function pointer accepting T...
, currently this is what I've got;
template<typename... Arguments>
using FunctionPointer = void (*)(Arguments...);
using FunctionPtr = FunctionPointer<typename std::tuple_element<0, V>::type,
typename std::tuple_element<1, V>::type,
typename std::tuple_element<2, V>::type>;
However I can't seem to find a way to do this, without manually entering each and every index from 0, ..., tuple_size<V>::value
. The FunctionPtr is defined in a context, where V=std::tuple<T...>
(also there is already a variadic template (hence I can't just pass T...
directly))
I guess I need to generate some list of indexes, and do some black magic..