[swift-evolution] [swift-evolution-announce] [Review] SE-0076: Add overrides taking an UnsafePointer source to non-destructive copying methods on UnsafeMutablePointer
atrick at apple.com
Tue May 3 23:39:00 CDT 2016
> On May 3, 2016, at 8:56 PM, Chris Lattner <clattner at apple.com> wrote:
> Hello Swift community,
> The review of "SE-0076: Add overrides taking an UnsafePointer source to non-destructive copying methods on UnsafeMutablePointer" begins now and runs through May 9. The proposal is available here:
> * What is your evaluation of the proposal?
The new methods are needed, but they don’t need to be overloads. I have no idea why the argument type was originally declared Mutable.
func assignBackwardFrom(source: UnsafePointer<Pointee>, count: Int)
func assignFrom(source: UnsafePointer<Pointee>, count: Int)
func initializeFrom(source: UnsafePointer<Pointee>, count: Int)
FWIW: I made precisely this change a while back on an experimental branch while experimenting with UnsafePointer conversion. I don’t see a problem with it.
Implicit argument conversion from UnsafeMutablePointer<Pointee> to UnsafePointer<Pointee> is normal and extremely obvious.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution