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


746. Use of auto in new-expressions

Section:  []     Status: CD2     Submitter: Jason Merrill     Date: 18 November, 2008

N2800 comment UK 95

[Voted into WP at July, 2009 meeting.]

In listing the acceptable contexts in which the auto specifier may appear, []) paragraph 4 mentions “the type-specifier-seq in a new-type-id” but not the type-id in the parenthesized form; that is, new auto (42) is well-formed but new (auto) (42) is not. This seems an unnecessary restriction, as well as contradicting [] paragraph 2:

If the auto type-specifier appears in the type-specifier-seq of a new-type-id or type-id of a new-expression...

(See also issue 496.)

Proposed resolution (March, 2009):

Change [] paragraph 4 as follows:

The auto type-specifier can also be used in declaring an object in the condition of a selection statement (8.5 []) or an iteration statement (8.6 [stmt.iter]), in the type-specifier-seq in a the new-type-id or type-id of a new-expression ( []), in a for-range-declaration...