What's the essential difference between these two variadic functions?
问题 I've been frustrated by a simple variadic template function: constexpr size_t num_args () { return 0; } template <typename H, typename... T> constexpr size_t num_args () { return 1 + num_args <T...> (); } int main () { std :: cout << num_args <int, int, int> (); } The above doesn't compile, see above linked question and followup for details, yet the following function DOES compile template <typename T, typename... Args> void foo (T, Args...); template <typename... Args> void foo (int, Args...