This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
[Accepted at the February, 2020 (Prague) meeting.]
The current wording for abbreviated function templates could lead to the incorrect conclusion that f and g in the example below are well-formed abbreviated function templates. The g case is the abbreviated function template analog of issue 2053 regarding generic lambdas.
184.108.40.206 [dcl.spec.auto] paragraph 4 clearly disallows the ap case. The inconsistency between the paragraph 2 wording for abbreviated function templates and the paragraph 4 wording is unintentional.
template <typename> struct A; void f(A<auto> x); void g(auto f() -> int); A<auto> *ap = static_cast<A<int> *>(0);
Proposed resolution (February, 2020):
Change 220.127.116.11 [dcl.spec.auto] paragraph 2 as follows:
A placeholder-type-specifier of the form type-constraintopt auto can be used
inthe decl-specifier-seq of a parameter-declaration of a function declaration or lambda-expression and signifies that the function is an abbreviated function template (18.104.22.168 [dcl.fct]) or the lambda is a generic lambda (7.5.5 [expr.prim.lambda]).
Change 22.214.171.124 [dcl.fct] paragraph 18 as follows:
An abbreviated function template is a function declaration
whose parameter-type-list includesone or more placeholders (126.96.36.199 [dcl.spec.auto]). An abbreviated function template is equivalent to a function template (188.8.131.52 [temp.over.link]) whose template-parameter-list includes one invented type template-parameter for each occurrence of aplaceholder type in the decl-specifier-seq of a parameter-declaration in the function's parameter-type-list, in order of appearance. For a placeholder-type-specifier of the form...
Change 7.5.5 [expr.prim.lambda] paragraph 5 as follows:
A lambda is a generic lambda if
there is a decl-specifier that is a placeholder-type-specifier in the decl-specifier-seq of a parameter-declaration ofthe lambda-expression , or if the lambda has a template-parameter-list. [Example:...
This resolution also resolves issue 2053.