You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something that comes up frequently when using pointers in Swift is the you can not return an UnsafeMutablePointer where an UnsafePointer is expected. In C, mutable pointers can be converted implicitly to "const" pointers. Would it be possible to add such a conversion to Swift without degrading type checking performance? I guess the same would go for UnsafeMutableRawPointers. This would help with code using imports of pointers from C which frequently have reasonably arbitrary mutability.
Cheers,
John
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 55a91170174a483a77e32bb3f8b5e054
Issue Description:
Hi Apple,
Something that comes up frequently when using pointers in Swift is the you can not return an UnsafeMutablePointer where an UnsafePointer is expected. In C, mutable pointers can be converted implicitly to "const" pointers. Would it be possible to add such a conversion to Swift without degrading type checking performance? I guess the same would go for UnsafeMutableRawPointers. This would help with code using imports of pointers from C which frequently have reasonably arbitrary mutability.
Cheers,
John
The text was updated successfully, but these errors were encountered: