Title
Mixed use of the auto specifier
Status
cd3
Section
9.2.9.6 [dcl.spec.auto]
Submitter
Michael Wong

Created on 2011-03-20.00:00:00 last changed 90 months ago

Messages

Date: 2012-02-15.00:00:00

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

Date: 2011-08-15.00:00:00

Proposed resolution (August, 2011):

Change 9.2.9.6 [dcl.spec.auto] 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:...
Date: 2011-03-20.00:00:00

The current wording of 9.2.9.6 [dcl.spec.auto] 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.)

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: drwp -> cd3
2012-11-03 00:00:00adminsetstatus: dr -> drwp
2012-02-27 00:00:00adminsetmessages: + msg3803
2012-02-27 00:00:00adminsetstatus: ready -> dr
2011-09-06 00:00:00adminsetmessages: + msg3453
2011-03-20 00:00:00admincreate