Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC++template metaprogrammingSingle-choice MCQ

Two overloads use the comma-fold idiom to print a pack. The author expects strict left-to-right order. Why is the order actually well-defined here, unlike a naive `int dummy[] = {(f(args),0)...}` written before C++17?

template<class... T> void show(T... t) { ((std::cout << t << ' '), ...); // unary right fold over comma }