The empty parenthesis (()
) will make it a function declaration only if it's written as such in the source code.
§14.5.3 [temp.variadic] p6
also mentions this:
The instantiation of a pack expansion that is not a sizeof... expression produces a list E1, E2, ..., EN, where N is the number of elements in the pack expansion parameters. [...] When N is zero, the instantiation of the expansion produces an empty list. Such an instantiation does not alter the syntactic interpretation of the enclosing construct, even in cases where omitting the list entirely would otherwise be ill-formed or would result in an ambiguity in the grammar. [ Example:
template<class... T> struct X : T... { };
template<class... T> void f(T... values) {
X<T...> x(values...);
}
template void f<>(); // OK: X<> has no base classes
// x is a variable of type X<> that is value-initialized
—end example ]
See specifically the second comment in the example code.