Title
Omitted bound in array new-expression
Status
cd5
Section
7.6.2.8 [expr.new]
Submitter
Johannes Schaub

Created on 2012-02-12.00:00:00 last changed 31 months ago

Messages

Date: 2012-08-15.00:00:00

Additional note (August, 2012):

The consensus during the 2012-08-13 drafting review teleconference was that this issue should be referred to the Evolution Working Group and not handled by the Core Working Group.

Date: 2019-02-15.00:00:00

[Adopted at the February, 2019 meeting as part of paper P1009R2.]

The syntax for noptr-new-declarator in 7.6.2.8 [expr.new] paragraph 1 requires an expression, even though the bound could be inferred from a braced-init-list initializer. It is not clear whether 9.4.2 [dcl.init.aggr] paragraph 4,

An array of unknown size initialized with a brace-enclosed initializer-list containing n initializer-clauses, where n shall be greater than zero, is defined as having n elements (9.3.4.5 [dcl.array]).

should be considered to apply to the new-type-id variant, e.g.,

  new (int[]){1, 2, 3}
History
Date User Action Args
2022-04-28 13:01:43adminsetstatus: extension -> cd5
2014-01-20 00:00:00adminsetstatus: drafting -> extension
2012-11-03 00:00:00adminsetstatus: open -> drafting
2012-09-24 00:00:00adminsetmessages: + msg3928
2012-02-12 00:00:00admincreate