Skip to content

CWG2709 Parenthesized initialization of reference-to-array #1494

@jensmaurer

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.

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