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.array]/8 does not take into account array xvalues #2049

Closed
languagelawyer opened this issue Apr 24, 2018 · 2 comments
Closed

[dcl.array]/8 does not take into account array xvalues #2049

languagelawyer opened this issue Apr 24, 2018 · 2 comments
Assignees

Comments

@languagelawyer
Copy link
Contributor

languagelawyer commented Apr 24, 2018

http://eel.is/c++draft/dcl.array#8.sentence-1 says:

Except where it has been declared for a class ([over.sub]), the subscript operator [] is interpreted in such a way that E1[E2] is identical to *((E1)+(E2)) ([expr.sub]).

Well, currently E1[E2] is not always identical to *((E1)+(E2)) valuecategorywise.

Also, can we call subscripting commutative (eel.is/c++draft/dcl.array#8.sentence-3), if in E1[E2], The expression E1 is sequenced before the expression E2.?

@jensmaurer jensmaurer self-assigned this Apr 24, 2018
@jensmaurer
Copy link
Member

... and sequencing-wise.

@languagelawyer
Copy link
Contributor Author

languagelawyer commented Apr 24, 2018

... and sequencing-wise.

I have edited the message 2 seconds before this =)

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

2 participants