-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Full name of submitter: Brian Bi
Issue description: [dcl.fct.default] and [temp.param] overlap, but should not, because the definition of "default argument" in p1 of the former section includes default template arguments for constant template parameters. The prohibition on default arguments for packs is redundantly specified in both. [dcl.fct.default]/5 and [temp.arg.nontype] could be read as simultaneously having application to default template arguments, or as the latter overriding the former. [dcl.fct.default] should be amended so that it clearly deals exclusively with default function arguments.
Suggested resolution: Edit [dcl.fct.default]/1 as shown:
If an initializer-clause is specified in a parameter-declaration other than a template-parameter ([temp.param]), this initializer-clause is used as a default argument. [Note 1: ...]
Edit [dcl.fct.default]/3 as shown:
A default argument shall be specified only in the parameter-declaration-clause of a function declaration or lambda-declarator
or in a template-parameter ([temp.param]). A default argument shall not be specified fora template parameter pack ora function parameter pack.If it is specified in a parameter-declaration-clause, itA default argument shall not occur within a declarator or abstract-declarator of a parameter-declaration. [Footnote 77]