Skip to content

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

@cpplearner

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)

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