-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Add support for C++ increment decrement operations #41232
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
Conversation
@swift-ci please smoke test. |
This looks great! Thank you! |
@swift-ci please smoke test. |
(You don't have to update this PR but) for future PRs, would you mind squashing all your commits into one commit? (Or one commit per "thing," i.e., one commit for increment and one commit for decrement.) Thanks again for your contribution! |
For sure! Happy to help where I can! 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't read this PR very clearly.
2defa94
to
9fc1cfd
Compare
The increment and decrement operators were removed from Swift (https://github.com/apple/swift-evolution/blob/master/proposals/0004-remove-pre-post-inc-decrement.md). I don't think we would want to bring them over from C++ as this doesn't seem Swifty. WDYT @zoecarver ? |
I was wondering about that, I had this conversation with another developer. About how the interop could possibly be some what more limited to encourage a "common language overlap". To generally make it easier for swift developers to interact with c++. |
That's a good point, but I think we should still err on the side of importing something that Swift has affordances for. I think operators like
|
For sure! That sounds like a great approach to me. I will do some more investigating. Edit: Bridging |
Thanks! @cabmeurer it might be good to add some test cases that verify that we can bridge over |
Awesome! Sounds good |
Support imported C++
++
and--
operators in Swift.Refs #32333