Deduction guides using abbreviated function syntax
Section [temp.deduct.guide]

Created on 2023-02-11.00:00:00 last changed 1 month ago


Date: 2023-02-18.18:43:04

CWG 2023-02-11

CWG solicits input from EWG whether abbreviated function syntax is intended to be used for deduction guides. See cplusplus/papers#1465.

Date: 2023-02-11.00:00:00

It is unclear whether deduction guides can be expressed using abbreviated function syntax. Subclause [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 ( [dcl.fct]). ...

However, that subclause is silent on the meaning of abbreviated function syntax when used for deduction guides. Furthermore, [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 ( [dcl.spec.auto]). ...

Arguably, the lack of template parameter names in abbreviated function syntax makes it less suitable to specifiy deduction guides.

Date User Action Args
2023-02-12 17:00:44adminsetmessages: + msg7197
2023-02-11 00:00:00admincreate