I have a class containing a tuple of functions, with their return types determined by the template of the class:
template <typename... Ts>
class A{
static inline auto funcs = std::make_tuple(std::function<Ts()>()...)
};
I would like to be able to iterate over these functions. I tried getting the indexes of each type from the template using the method from this answer: https://stackoverflow.com/a/26169248/
std::get<Index<Ts,Ts...>::value>(funcs)()...;
But this code doesn't compile. It complains about the "..." at the end, possibly because the template parameter pack was already expanded when I typed "T...", but I don't see why it won't let me expand the other "Ts". Is there a way to do this?