In the C++03 standard, [dcl.fct] p.2 states that:
The parameter-declaration-clause determines the arguments that can be specified, and their processing, when the func- tion is called. [ Note: the parameter-declaration-clause is used to convert the arguments specified on the function call; see5.2.2. —endnote]Iftheparameter-declaration-clauseisempty,thefunctiontakesnoarguments.Theparameter list (void) is equivalent to the empty parameter list. Except for this special case, void shall not be a parameter type (though types derived from void, such as void*, can). If the parameter-declaration-clause terminates with an ellipsis, the number of arguments shall be equal to or greater than the number of parameters that do not have a default argument. Where syntactically correct, “, ...” is synonymous with “...”.
The grammar for a parameter-declaration-clause
allows it to end in either ...
or , ...
. I found this question and the answers said that initially the grammar allowed only ...
, and the comma variant (, ...
) was introduced for compatibility with C.
My question is why does the quoted paragraph say "where syntactically correct"? Considering that function parameter packs
or pack expansions
were not present in C++03, are there any cases where it would be "syntactically incorrect" to consider ...
synonymous with , ...
?
Thank you.