-
Notifications
You must be signed in to change notification settings - Fork 1
CWG2548 Array prvalues and additive operators #1633
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
Comments
EWG discussed CWG2548 during the Tuesday Morning session in Kona. The following poll was taken. CWG2548 "Array prvalues and additive operators" is not a defect, this corner-case should not be supported given the direction given to P2865.
Result: Consensus |
Feedback from @zygoloid: "CWG seeks advice from EWG whether support for array prvalue operands should be added for the indirection operator, the unary + operator, and the additive operators, along the lines of the wording above. Similar to the [] operator, the specification of the indirection operation could be amended to yield an xvalue if the argument is a prvalue. The unary + operator is occasionally used to force an array-to-pointer decay." -- sounds like CWG was asking for yes or no, not a fishing expedition. CWG found three places where array prvalues didn't work, but array glvalues did, and wanted permission to make them work. And had wording changes to do so. I think the reference to P2865 was a distraction; the CWG issue was about making prvalues decay in the same places where glvalues do (where there was a wording oversight preventing decay but implementations mostly did it anyway). P2865 was about not allowing arrays at all as operands of some operators. |
EWG re-discussed given the above feedback. The issue might have been inadvertent but EWG likes the omission even if it is inconsistent. Adding the features for consistency does not seem useful, hence the resolution of "not a defect". That said, EWG could be convinced if a paper were presented to add the feature with compelling motivation. |
CWG seeks advice from EWG whether support for array prvalue operands should be added for the indirection operator, the unary + operator, and the additive operators, along the lines of the wording in the issue. Similar to the [] operator, the specification of the indirection operation could be amended to yield an xvalue if the argument is a prvalue.
See CWG2548 for details.
The text was updated successfully, but these errors were encountered: