This should be fairly easy. First define a typelist_nth
type function (left as an exercise; I assume you have one in your typelist.h
):
template<typename TL, int I> struct typelist_nth;
Then use a variadic template to build a function type:
template<typename TL, int... Is> struct FunctionFromFields {
typedef void (*Type)(typename typelist_nth<TL, Is>::type *...);
};