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

2024-11-11


914. Value-initialization of array types

Section: 7.6.1.4  [expr.type.conv]     Status: open     Submitter: Gabriel Dos Reis     Date: 10 June, 2009     Liaison: EWG

Although value-initialization is defined for array types and the () initializer is permitted in a mem-initializer naming an array member of a class, the syntax T() (where is an array type) is explicitly forbidden by 7.6.1.4 [expr.type.conv] paragraph 2. This is inconsistent and the syntax should be permitted.

Rationale (July, 2009):

The CWG was not convinced of the utility of this extension, especially in light of questions about handling the lifetime of temporary arrays. This suggestion needs a proposal and analysis by the EWG before it can be considered by the CWG.

EWG 2022-11-11

This is a defect; a paper is needed. This is tracked in github issue cplusplus/papers#1372.