Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC++variadic templatesSingle-choice MCQ

What is the purpose of the comma in `(void(std::cout << args << ' '), ...)` versus simply writing `(std::cout << args << ' ', ...)`?

template <typename... Args> void print_all(Args&&... args) { (void(std::cout << args << ' '), ...); }