Skip to content

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

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

Metadata

Metadata

Assignees

Labels

P1-ImportantMisapplication of paper, malformed code, internal inconsistencies

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions