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

What is the value of `sizeof...(Rest)` and the printed result for this recursive variadic call?

#include <iostream> template <typename T> int count(T) { return 0; } template <typename First, typename... Rest> int count(First, Rest... rest) { return 1 + count(rest...); } int main() { std::cout << count(1, 2.0, '3', 4u); }