Title
Aggregate initialization for std::array
Status
c++17
Section
[array.overview]
Submitter
Robert Haberlach

Created on 2016-01-30.00:00:00 last changed 81 months ago

Messages

Date: 2016-02-07.20:24:45

Proposed resolution:

This wording is relative to N4567.

  1. Change [array.overview] p2 as indicated:

    -2- An array is an aggregate (8.5.1) that can be list-initialized with the syntax

    array<T, N> a = { initializer-list };
    

    where initializer-list is a comma-separated list of up to N elements whose types are convertible to T.

Date: 2016-02-07.20:24:45

[ 2016-02, Issues Telecon ]

P0; move to Tentatively Ready.

Date: 2016-01-30.00:00:00

Similar to core issue 1270's resolution, [array.overview]/2 should cover aggregate-initialization in general. As it stands, that paragraph solely mentions copy-list-initialization — i.e. it is unclear whether the following notation is (guaranteed to be) well-formed:

std::array<int, 1> arr{0};
History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2016-03-07 04:11:48adminsetstatus: ready -> wp
2016-02-07 20:24:45adminsetmessages: + msg7977
2016-02-07 20:24:45adminsetstatus: new -> ready
2016-01-30 18:04:05adminsetmessages: + msg7947
2016-01-30 00:00:00admincreate