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

What is wrong with this recursive variadic 'head' extraction when the pack is non-empty but you also provide the empty base case shown?

void process() {} // base case template <typename T, typename... Rest> void process(T first, Rest... rest) { handle(first); process(rest...); // recurse on tail }