Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CWG2709 Parenthesized initialization of reference-to-array #1494

Closed
jensmaurer opened this issue Mar 16, 2023 · 1 comment
Closed

CWG2709 Parenthesized initialization of reference-to-array #1494

jensmaurer opened this issue Mar 16, 2023 · 1 comment
Labels
EWG Evolution

Comments

@jensmaurer
Copy link
Member

Paper P0960R3 enabled initialization of aggregates (including arrays) from parenthesized expression lists. The rather similar case of initializating a reference to an aggregate was not addressed. For example:

  const int (&ra)[2](1,2);

There is no evidence in 9.4.1 [dcl.init.general] paragraph 16 that such support is intended, nor does 9.4.4 [dcl.init.ref] paragraph 5 admit an initializer other than a (single) expression for a reference.

See CWG2709.

@jensmaurer jensmaurer added the EWG Evolution label Mar 16, 2023
@erichkeane
Copy link
Collaborator

EWG discussed this during the May 11th, 2023 telecon, and the following poll was taken:

For CWG2709, EWG believes that parenthesized aggregate initialization should also be valid on a reference to an aggregate.

SF F N A SA
0 0 4 6 2

Result: Consensus Against

EWG was in agreement with the status quo, so there is nothing left to do for this issue, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EWG Evolution
Projects
None yet
Development

No branches or pull requests

2 participants