-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CWG2942 [dcl.fct] packs in parameter-type-list #629
Comments
Regarding the proposed resolution. Given
I think whether a given parameter declaration is a pack or not is covered by the preceding wording. We can just strike the part about parameter packs where we talk about ellipsis. |
I am not sure this is correct. the "packness" is part of the declaration, not the type. So presumably, there needs to be some wording to propagate that. |
I disagree. (Note that we're at the template level here, so "type" might be a bit more than what the rest of the type system, after instantiation, knows about.) "The type of each parameter (including function parameter packs) is determined from its own parameter-declaration (9.3)'" The packness is part of the parameter-declaration; if we feel something is amiss, [dcl.meaning.general] would need amendment somewhere. Suggestions welcome. |
in decl.fct p4, we say
After producing the list of parameter types, any top-level cv-qualifiers modifying a parameter type are deleted when forming the function type. The resulting list of transformed parameter types and the presence or absence of the ellipsis or a function parameter pack is the function's parameter-type-list.
Emphasis mine.
It's not clear what we mean by "or a function parameter pack".
A function can have a number of parameter packs in arbitrary position, and the fact that only the trailing pack is a deduced context is irrelevant when we are not deducing anything.
Are these functions equivalent?
Proposed resolution (which needs further massaging)
After producing the list of parameter types, any top-level cv-qualifiers modifying a parameter type are deleted when forming the function type. The resulting list of transformed parameter types and whether each corresponding parameter-declaration is a function parameter pack and the presence or absence of the ellipsis
or a function parameter packis the function's parameter-type-list.The text was updated successfully, but these errors were encountered: