This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-12-20
[Voted into WP at April 2003 meeting.]
The interaction of default arguments and ellipsis is not clearlyspelled out in the current wording of the Standard.9.3.4.7 [dcl.fct.default] paragraph 4 says,
In a given function declaration, all parameters subsequent to aparameter with a default argument shall have default argumentssupplied in this or previous declarations.
Strictly speaking, ellipsis isn't a parameter, but this couldbe clearer. Also, in 9.3.4.6 [dcl.fct] paragraph 2,
If theparameter-declaration-clause terminates with anellipsis, the number of arguments shall be equal to or greater thanthe number of parameters specified.
This could be interpreted to refer to the number of argumentsafter the addition of default arguments to the argument list givenin the call expression, but again it could be clearer.
Notes from 04/01 meeting:
The consensus opinion was that an ellipsis is not a parameterand that default arguments should be permitted preceding anellipsis.
Proposed Resolution (4/02):
Change the following sentence in 9.3.4.6 [dcl.fct] paragraph 2from
If theparameter-declaration-clause terminates with an ellipsis, thenumber of arguments shall be equal to or greater than the number ofparameters specified.
to
If theparameter-declaration-clause terminates with an ellipsis, thenumber of arguments shall be equal to or greater than the number ofparameters that do not have a default argument.
As noted in the defect, section 9.3.4.7 [dcl.fct.default]is correct but could be clearer.
In 9.3.4.7 [dcl.fct.default], add the following as the first lineof the example in paragraph 4.
void g(int = 0, ...); // okay, ellipsis is not a parameter so it can follow // a parameter with a default argument