I want to create an UnsafePointer from immutable values.
The simplest reproduction of what I was trying to do is as follows:
let number : Int = 42; var pointer = UnsafePointer<Int>(&number); ^ | Could not make `inout Int` from immutable value.
Since Int does not match AnyObject , I cannot use unsafeAddressOf() .
source share