template
void for_each_argument(F f, Args&&... args) {
[](...){}((f(std::forward(args)), 0)...);
}
<
Actually it calls function f for each argument in args in unspecified order.
[](...){}
create lambda function, that does nothing and receives arbitrary number of arguments (va args).
((f(std::forward(args)), 0)...)
argument of lambda.
(f(std::forward(args)), 0)
call f with forwarded argument, send 0 to lambda.
If you want specified order you can use following thing:
using swallow = int[];
(void)swallow{0, (f(std::forward(args)), 0)...};