Created on 2023-02-11.00:00:00 last changed 2 months ago
Proposed resolution (approved by CWG 2023-05-12):
Change in 220.127.116.11 [temp.deduct.guide] paragraph 3 as follows:
The same restrictions apply to the parameter-declaration-clause of a deduction guide as in a function declaration (18.104.22.168 [dcl.fct]). The simple-template-id shall name a class template specialization. The template-name shall be the same identifier as the template-name of the simple-template-id. A deduction-guide shall inhabit the scope to which the corresponding class template belongs and, for a member class template, have the same access. Two deduction guide declarations for the same class template shall not have equivalent parameter-declaration-clauses if either is reachable from the other.
CWG solicits input from EWG whether abbreviated function syntax is intended to be used for deduction guides. See cplusplus/papers#1465.
CWG should clarify that abbreviated function syntax should not be permitted in deduction guides.
[Accepted as a DR at the June, 2023 meeting.]
It is unclear whether deduction guides can be expressed using abbreviated function syntax. Subclause 22.214.171.124 [temp.deduct.guide] paragraph 3 refers to the restrictions of a function's parameter-declaration-clause:
The same restrictions apply to the parameter-declaration-clause of a deduction guide as in a function declaration (126.96.36.199 [dcl.fct]). ...
However, that subclause is silent on the meaning of abbreviated function syntax when used for deduction guides. Furthermore, 188.8.131.52 [dcl.fct] paragraph 22 explicitly restricts the definition to function templates, which deduction guides are not:
An abbreviated function template is a function declaration that has one or more generic parameter type placeholders (184.108.40.206 [dcl.spec.auto]). ...
Arguably, the lack of template parameter names in abbreviated function syntax makes it less suitable to specifiy deduction guides.
|2023-07-16 13:00:43||admin||set||status: ready -> dr|
|2023-05-12 20:29:43||admin||set||messages: + msg7276|
|2023-05-12 20:29:43||admin||set||status: review -> ready|
|2023-05-11 20:09:57||admin||set||status: open -> review|
|2023-02-12 17:00:44||admin||set||messages: + msg7197|