- Title
- Use of auto in new-expressions
- Status
- cd2
- Section
- 9.2.9.7 [dcl.spec.auto]
- Submitter
- Jason Merrill
Created on 2008-11-18.00:00:00 last changed 199 months ago
Messages
Date: 2009-07-15.00:00:00
[Voted into WP at July, 2009 meeting.]
Date: 2009-03-15.00:00:00
Proposed resolution (March, 2009): Change 9.2.9.7 [dcl.spec.auto] 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 [stmt.select]) 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
(7.6.2.8 [expr.new]), in a for-range-declaration...
Date: 2026-07-25.21:52:10
N2800 comment
UK 95 In listing the acceptable contexts in which the auto
specifier may appear, 9.2.9.7 [dcl.spec.auto]) 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
7.6.2.8 [expr.new] paragraph 2: (See also issue 496.)
If the auto type-specifier appears in the
type-specifier-seq of a new-type-id or type-id of
a new-expression...
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-03-29 00:00:00 | admin | set | status: wp -> cd2 |
| 2009-11-08 00:00:00 | admin | set | status: dr -> wp |
| 2009-08-03 00:00:00 | admin | set | messages: + msg2256 |
| 2009-08-03 00:00:00 | admin | set | status: ready -> dr |
| 2009-03-23 00:00:00 | admin | set | messages: + msg1887 |
| 2009-03-23 00:00:00 | admin | set | status: open -> ready |
| 2008-11-18 00:00:00 | admin | create | |