Skip to content

CWG2709 Parenthesized initialization of reference-to-array #1494

Description

@jensmaurer

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.

Activity

  1. erichkeane commented on May 11, 2023

    @erichkeane
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    EWGEvolution

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions