For starters, please at least use
std::array
and not std::vector
. Second, both of those limit you to the same argument types. Third, you can loop over a pack using an immediately-unvoked lambda: ([&]{std::cout << args << '\n';}(), ...);
.