This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-04-18


982. Initialization with an empty initializer list

Section: 9.4.5  [dcl.init.list]     Status: NAD     Submitter: Daniel Krügler     Date: 17 October, 2009

The exposition of list initialization using an array in 9.4.5 [dcl.init.list] paragraph 4 raises the question of whether an empty initializer list is permitted, as declaration of an array with a zero bound is ill-formed.

Rationale (October, 2009):

The description is intended as an aid to understanding the concepts, not as a literal transformation that is performed. An implementation is permitted to allocate a zero-length array, even if such as array cannot be decclared (e.g., via a new-expression).