Skip to content

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

Description

@cpplearner

[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)

Activity

  1. cpplearner commented on Sep 21, 2019

    @cpplearner
    ContributorAuthor

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

  2. jensmaurer commented on Sep 24, 2019

    @jensmaurer
    Member

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

  3. self-assigned this
    on Sep 24, 2019
  4. jensmaurer commented on Oct 16, 2019

    @jensmaurer
    Member

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

  5. added
    not-editorialIssue is not deemed editorial; the editorial issue is kept open for tracking.
    on Oct 16, 2019
  6. removed their assignment
    on Oct 20, 2019
  7. cpplearner commented on Jan 14, 2020

    @cpplearner
    ContributorAuthor

    Fixed by CWG 2442 (commit fd20a44).

  8. changed the title [-][over.match.viable] footnote is incorrect[/-] [+][over.match.viable] CWG 2442: footnote is incorrect[/+] on Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cwgIssue must be reviewed by CWG.not-editorialIssue is not deemed editorial; the editorial issue is kept open for tracking.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions