-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Subscript expressions #44
Comments
Hello pepsiman, wonderful. That's one of this nice language features where I ask myself why it is there. I did a quick test and if that the transformation is easy at a first glance, all cases are more difficult. Once again I'm thinking about an option to show it ore leave it the way it is. Of course, a PR is welcome. |
Not exactly since C++14.
|
@languagelawyer thanks for pointing that out. I'm unaware of that change. While reading my former response I think I should apologize for my bad English. Let me try again. |
…ession. Subscriptions `E1[E2]` can also be written in the form `*(E1 = E2)`. This patch adds a command line option to select this transformation.
Fixed #44: Support alternative representation for a subscription expression.
https://en.cppreference.com/w/cpp/language/operator_member_access says
"The built-in subscript expression E1[E2] is exactly identical to the expression *(E1 + E2)"
It's a useful insight when E1 is not an array or pointer, but E2 is.
The text was updated successfully, but these errors were encountered: