Avatar
omochimetaru 10/9/2018 9:46 AM
extension書くとか!
9:47 AM
@swift-4.2.4 struct RGBA<Channel> { var red: Channel var green: Channel var blue: Channel var alpha: Channel } var rgbaArray = [RGBA<UInt8>(red: 255, green: 127, blue: 0, alpha: 255)] func constF(_ p: UnsafeBufferPointer<RGBA<UInt8>>) {} func mutableF(_ p: UnsafeMutableBufferPointer<RGBA<UInt8>> ) {} constF(rgbaArray) mutableF(&rgbaArray)