Avatar
https://github.com/apple/swift/blob/master/docs/Generics.rst#specialization struct S<T> { var x: T @_specialize(where T == Int, U == Float) mutating func exchangeSecond<U>(_ u: U, _ t: T) -> (U, T) { x = t return (u, x) } } できますね。
swift - The Swift Programming Language