Challenge 2: A Variadic sum_all Using a Fold Expression — Possible Solution ==================================================================== #include template auto sum_all(Args... args) { return (args + ...); // C++17 fold expression } int main() { std::cout << sum_all(1, 2) << std::endl; std::cout << sum_all(1, 2, 3) << std::endl; std::cout << sum_all(1, 2, 3, 4, 5) << std::endl; return 0; } Output: 3 6 15 WHY THIS WORKS AS AN ANSWER ------------------------------ The single variadic template definition, template, accepts genuinely different numbers of arguments across the three calls (2, 3, and 5), and the fold expression (args + ...) expands, at compile time, into the equivalent of args1 + args2 + ... for however many arguments were actually passed -- exactly the "arbitrary number of arguments" capability the chapter describes as powering functions like make_unique throughout the STL.