[swift-evolution] Can functions/methods be overloaded on mutability of parameters?

Daryle Walker darylew at mac.com
Sat Jun 3 00:29:44 CDT 2017


Can I make two overloads such that one can take an argument from a “let”-mode object or a regular function parameter and return an UnsafePointer and then have the other take a “var”-mode object or inout function parameter and return an UnsafeMutablePointer? I think this can be done in C++.

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170603/45ba4fe3/attachment.html>


More information about the swift-evolution mailing list