Skip to content

[dcl.init.general] p20 contradicts the wording of parenthesized aggregate-initialization #6755

Open
@poyaoc97

Description

@poyaoc97

[dcl.init.general]p20 says:

If the initializer is a parenthesized expression-list, the expressions are evaluated in the order specified for function calls ([expr.call]).

However, that's not intended for parenthesized aggregate-initialization introduced by P0960R3, of which the evaluation order went back-and-forth but finally settled on in-order, left-to-right evaluation.

-If the initializer is a parenthesized \grammarterm{expression-list},
+Unless otherwise specified,
 the expressions are evaluated in the order
-specified for function calls\iref{expr.call}.
+specified for function calls\iref{expr.call}
+if the initializer is a parenthesized \grammarterm{expression-list}.

Would this be a suitable change?

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @poyaoc97

        Issue actions

          [dcl.init.general] p20 contradicts the wording of parenthesized aggregate-initialization · Issue #6755 · cplusplus/draft