You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CWG1790 Ellipsis following function parameter pack #1374
Section: 9.3.4.6 [dcl.fct] Status: extension Submitter: Daryle Walker Date: 2013-10-01
Although the current wording permits an ellipsis to immediately follow a function parameter pack, it is not clear that the facilities permit access to the ellipsis arguments.
Rationale (June, 2014):
CWG felt that this is a question of language design and thus should be considered by EWG before any action.
Although the current wording permits an ellipsis to immediately follow a function parameter pack, it is not clear that the facilities permit access to the ellipsis arguments.
The problem here (which is not explained in the issue) is: how do you supply the name of the last parameter before the ellipsis to va_start? You can’t put the name of a pack there (it wouldn’t be expanded) and there’s no way to name the last element of the pack (nor to deal with the case where the pack is empty).
Meeting: (notes) 3 options: fix wording around “last parameter”, remove facility entirely (either va_start or function declarator), try to invent a language facility. JF emailed EWG to see if anyone has a strong preference, or if we should send back to CWG to fix wording, long discussion.
Michael Spertus: I am willing to commit to including and analysis on this in an upcoming paper on parameter packs.
JF followed up with Michael and Barry, no response.
Activity
jensmaurer commentedon Oct 24, 2023
C23 removes the requirement that the last parameter be named for va_start.
All that remains is updating our specification of va_start to follow, which is handled by P2537 Relax va_start Requirements to Match C #1200.