I know that we can't use variadic expansions as if it is a chain of comma operators. In that question the sample is like this:
template<typename... Args>
inline void increment_all(Args&... args)
{
++args...;
}
It might be ambiguous either to increment or expand first so parentheses won't hurt:
template<typename... Args>
inline void increment_all(Args&... args)
{
(++args)...;
}
or something like this:
template<typename... Args>
void cout_all(Args&&... args)
{
(std::cout << std::forward<Args>(args))...;
}
I know that we can use some recursion tricks to get what we want, like this. What I don't know is why does not the standard describe such behavior? I mean, what is the reason behind it?