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


1469. Omitted bound in array new-expression

Section:  []     Status: CD5     Submitter: Johannes Schaub     Date: 2012-02-12

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

The syntax for noptr-new-declarator in [] 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 ( [dcl.array]).

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

  new (int[]){1, 2, 3}

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.