This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-10-26


1069. Incorrect function type with trailing-return-type

Section: 9.3.4.6  [dcl.fct]     Status: C++11     Submitter: James Widman     Date: 2010-04-30

[Voted into the WP at the November, 2010 meeting.]

In 9.3.4.6 [dcl.fct] paragraph 2, the type of a function declarator with a trailing-return-type is said to be

“function of (parameter-declaration-clause) cv-qualifier-seqopt ref-qualifieropt returning type-id”.

This formulation incorrectly omits the derived-declarator-type-list modifier for the type, and it should refer to “the trailing-type-specifier-seq of the trailing-return-type” as the return type instead of type-id (which is left over from before the introduction of trailing-return-type).

Proposed resolution (September, 2010):

Change 9.3.4.6 [dcl.fct] paragraph 2 as follows:

...T shall be the single type-specifier auto. The type of the declarator-id in D is “derived-declarator-type-list function of (parameter-declaration-clause) cv-qualifier-seqopt ref-qualifieropt returning type-id trailing-return-type”. The optional...