This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115a. See for the official list.


1265. Mixed use of the auto specifier

Section:  []     Status: CD3     Submitter: Michael Wong     Date: 2011-03-20

[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]

The current wording of [] does not appear to forbid using the auto specifier for both a function declaration with a trailing return type and a variable definition in the same declaration, e.g.,

    auto f() -> int, i = 0;

(See also issue 1347.)

Proposed resolution (August, 2011):

Change [] paragraph 7 as follows:

If the list of declarators contains more than one declarator, they shall all form declarations of variables. The the type of each declared variable is determined as described above. If, and if the type deduced for the template parameter U is not the same in each deduction, the program is ill-formed. [Example:...