[swift-evolution] [Accepted] SE-0016 - Adding initializers to Int and UInt to convert from UnsafePointer and UnsafeMutablePointer

Chris Lattner clattner at apple.com
Wed Mar 30 23:11:54 CDT 2016


Proposal Link: https://github.com/apple/swift-evolution/blob/master/proposals/0016-initializers-for-converting-unsafe-pointers-to-ints.md

The review of SE-0016  "Adding initializers to Int and UInt to convert from UnsafePointer and UnsafeMutablePointer" ran from Mar 22…25, 2016. The proposal has been *accepted*:

As discussed in the motivation, this rounds out a missing aspect of our unsafe pointer APIs.  Where it was possible to convert Int/UInt to unsafe pointer, it wasn’t possible to convert back (without using unsafeBitcast).  Adding these converting initializers fixes this, and the use of the bitPattern argument label is consistent with other similar APIs in the standard library.

Thank you to Michael Buckley for proposing this!  I filed SR-1115 to track this task,

-Chris Lattner
Review Manager


More information about the swift-evolution mailing list