- Title
- Default arguments and ellipsis
- Status
- cd1
- Section
- 9.3.4.6 [dcl.fct]
- Submitter
- Jamie Schmeiser
Created on 2000-11-13.00:00:00 last changed 217 months ago
Messages
Date: 2003-04-15.00:00:00
[Voted into WP at April 2003 meeting.]
Date: 2002-04-15.00:00:00
Proposed Resolution (4/02): Change the following sentence in 9.3.4.6 [dcl.fct] paragraph 2
from to 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 line
of the example in paragraph 4.
If the parameter-declaration-clause terminates with an ellipsis, the
number of arguments shall be equal to or greater than the number of
parameters specified.
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.
void g(int = 0, ...); // okay, ellipsis is not a parameter so it can follow
// a parameter with a default argument
Date: 2001-04-15.00:00:00
Notes from 04/01 meeting: The consensus opinion was that an ellipsis is not a parameter
and that default arguments should be permitted preceding an
ellipsis.
Date: 2026-07-27.15:54:01
The interaction of default arguments and ellipsis is not clearly
spelled out in the current wording of the Standard.
9.3.4.7 [dcl.fct.default] paragraph 4 says, Strictly speaking, ellipsis isn't a parameter, but this could
be clearer. Also, in 9.3.4.6 [dcl.fct] paragraph 2, This could be interpreted to refer to the number of arguments
after the addition of default arguments to the argument list given
in the call expression, but again it could be clearer.
In a given function declaration, all parameters subsequent to a
parameter with a default argument shall have default arguments
supplied in this or previous declarations.
If the parameter-declaration-clause terminates with an
ellipsis, the number of arguments shall be equal to or greater than
the number of parameters specified.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
| 2003-04-25 00:00:00 | admin | set | messages: + msg864 |
| 2003-04-25 00:00:00 | admin | set | status: ready -> wp |
| 2002-11-08 00:00:00 | admin | set | status: review -> ready |
| 2002-05-10 00:00:00 | admin | set | messages: + msg621 |
| 2002-05-10 00:00:00 | admin | set | status: drafting -> review |
| 2001-05-20 00:00:00 | admin | set | messages: + msg494 |
| 2001-05-20 00:00:00 | admin | set | status: open -> drafting |
| 2000-11-13 00:00:00 | admin | create | |