[swift-users] Why does withUnsafePointer(to:) require a var argument?

Rick Mann rmann at latencyzero.com
Wed Apr 26 19:42:49 CDT 2017


We have withUnsafePointer(to:) and withUnsafeMutablePointer(to:). Why does the first take an inout parameter? The function names imply that the first will not modify the pointer (which I take to mean its contents), and it makes it quite clunky to pass in constant things.

-- 
Rick Mann
rmann at latencyzero.com




More information about the swift-users mailing list