How do you loop over a parameter pack using a pack expansion?
One of the places where a pack expansion can occur is inside a braced-init-list. You can take advantage of this by putting the expansion inside the initializer list of a dummy array: template<typename… Args> static void foo2(Args &&… args) { int dummy[] = { 0, ( (void) bar(std::forward<Args>(args)), 0) … }; } To explain the … Read more