Title
Value-initialization of array types
Status
open
Section
7.6.1.4 [expr.type.conv]
Submitter
Gabriel Dos Reis

Created on 2009-06-10.00:00:00 last changed 17 months ago

Messages

Date: 2022-11-24.22:09:32

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.

History
Date User Action Args
2022-11-24 22:09:32adminsetstatus: extension -> open
2009-08-03 00:00:00adminsetstatus: open -> extension
2009-06-10 00:00:00admincreate