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

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

Open
poyaoc97 opened this issue Jan 2, 2024 · 0 comments

Comments

@poyaoc97
Copy link
Contributor

poyaoc97 commented Jan 2, 2024

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

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

No branches or pull requests

1 participant