[swift-evolution] [Accepted with Revision] SE-0076: Add overrides taking an UnsafePointer source to non-destructive copying methods on UnsafeMutablePointer

Chris Lattner clattner at apple.com
Wed May 11 17:55:26 CDT 2016


Proposal link: https://github.com/apple/swift-evolution/blob/master/proposals/0076-copying-to-unsafe-mutable-pointer-with-unsafe-pointer-source.md

Hello Swift Community,

The review of SE-0076: "Add overrides taking an UnsafePointer source to non-destructive copying methods on UnsafeMutablePointer" ran from May 3…9, 2016. The proposal is *Accepted with Revision* for Swift 3.  

The feedback on the proposal from the community and the core team universally agreed that there is a problem that needs to be solved here.  However, instead of adding overloads of the methods as proposed, it would be better to change the existing methods to take UnsafePointer<> instead of UnsafeMutablePointer<>.  Given the existing promotion rules that exist in the compiler, it will achieve the same effect.  As part of this, other similar functions in the standard library should be audited and fixed as well.

Thank you to Janosch Hildebrand for driving this discussion.  I filed SR-1490 to track this work, it would be a great starter bug.

-Chris Lattner
Review Manager



More information about the swift-evolution mailing list