Reputation: 28384
In this snippet
template<typename... Types>
void f(Types ... args);
Types
is the template parameter pack and args
is a function parameter pack.
Concerning the two technical terms, C++ Templates - The Complete Guide 2nd Edition reads
Unlike template parameter packs, function parameter packs are always pack expansions, so their declared types must include at least one parameter pack.
What does that mean? What is the example of non-at least one, i.e. zero in the context of that sentence?
Upvotes: 1
Views: 66
Reputation: 96012
It says that a function parameter pack can only be created using another parameter pack, rather than from scratch.
What is the example of non-at least one, i.e. zero in the context of that sentence?
E.g. int ...params
is illegal, because it doesn't contain any existing packs.
Upvotes: 2