Skip to content
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

[over.match.viable] CWG 2442: footnote is incorrect #3235

Closed
cpplearner opened this issue Sep 21, 2019 · 5 comments
Closed

[over.match.viable] CWG 2442: footnote is incorrect #3235

cpplearner opened this issue Sep 21, 2019 · 5 comments
Labels
cwg Issue must be reviewed by CWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.

Comments

@cpplearner
Copy link
Contributor

[over.match.viable]:

A candidate function having more than m parameters is viable only if the (m+1)st parameter has a default argument ([dcl.fct.default]).124

and footnote 124 says:

According to [dcl.fct.default], parameters following the (m+1)st parameter must also have default arguments.

However, according to [dcl.fct.default], subsequent parameters do not need to have default arguments if they were expanded from a parameter pack.

template<class ... T> struct C {
  void f(int n = 0, T...);
};
C<int> c;                       // OK, instantiates declaration void C​::​f(int n = 0, int)
@cpplearner
Copy link
Contributor Author

The relevant wording in [dcl.fct.default] was introduced by CWG 2233.

@jensmaurer
Copy link
Member

jensmaurer commented Sep 24, 2019

Not just the footnote is incorrect, but also the normative sentence here. This seems to be a "should have CWG eyes" editorial issue.

@jensmaurer
Copy link
Member

@jensmaurer
Copy link
Member

CWG teleconference: This is a normative change and will be handled by a CWG issue.

@jensmaurer jensmaurer added the not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. label Oct 16, 2019
@jensmaurer jensmaurer removed their assignment Oct 20, 2019
@cpplearner
Copy link
Contributor Author

Fixed by CWG 2442 (commit fd20a44).

@jensmaurer jensmaurer changed the title [over.match.viable] footnote is incorrect [over.match.viable] CWG 2442: footnote is incorrect Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants