Created on 2025-08-13.00:00:00 last changed 1 month ago
(From submission #750.)
As written, 9.3.4.7 [dcl.fct.default] applies to default arguments for constant template parameters, which are specified in 13.2 [temp.param] and 13.4.3 [temp.arg.nontype]. Remove the overlap.
Possible resolution:
Change in 9.3.4.7 [dcl.fct.default] paragraph 1 as follows:
If an initializer-clause is specified in a parameter-declaration other than a template-parameter (13.2 [temp.param]), this initializer-clause is used as a default argument. [Note 1: Default arguments will be used in calls where trailing arguments are missing (7.6.1.3 [expr.call]). —end note]
Change in 9.3.4.7 [dcl.fct.default] paragraph 3 as follows:
A default argument shall be specified only in the parameter-declaration-clause of a function declaration or lambda-declaratoror in a template-parameter (13.2 [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: .... ]
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-08-13 00:00:00 | admin | create |