-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Interop] Bridging cleanup #84527
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
base: main
Are you sure you want to change the base?
[Interop] Bridging cleanup #84527
Conversation
Inheriting some class named `NonCopyable` is not what makes a type noncopyable. Explicitly use SWIFT_NONCOPYABLE in the example instead.
@swift-ci please smoke test |
/// ```c++ | ||
/// class SWIFT_SHARED_REFERENCE(retainSharedObject, releaseSharedObject) | ||
/// SharedObject : NonCopyable, IntrusiveReferenceCounted<SharedObject> { | ||
/// class SWIFT_SHARED_REFERENCE(retainSharedObject, releaseSharedObject) SWIFT_NONCOPYABLE |
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.
Does SWIFT_NONCOPYABLE
actually have any effect when applied to reference types?
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.
good point actually
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.
Then I'm not sure I follow the intent of the example 🤔
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.
I think we can remove the noncopyable
here entirely, just to avoid the (incorrect) assumption that a foreign reference type must be annotated as a noncopyable type explicitly.
@swift-ci please smoke test |
Some cleanup in
swift/bridging
.