Calling a function for each variadic template argument and an array
You could refactor or wrap f to return a new X instead of having it passed, since this would play pack expansion into the hand and make the function really concise: template<class T> X fw(T const& t){ X x; f(x, t); return x; } template<class… Args> void h(Args… args){ X xs[] = { fw(args)… }; … Read more