Accepted answer is very good, but here's an idea using C++14 generic lambdas:
template
void variadic_for_each(F) {}
template
void variadic_for_each(Head&& head, Tail&&... tail, F f)
{
f(std::forward(head));
variadic_for_each(std::forward(tail)..., f);
}
Example usage:
template
void myFunc(Ts&&... vs)
{
variadic_for_each(std::forward(vs)..., [](auto&& v)
{
// loop body
});
}