The release notes of Xcode 8.1 beta 3 said: > Two types have been added to the Swift standard library: > UnsafeRawBufferPointer and UnsafeMutableRawBufferPointer.
But I'm getting errors on building sample codes in release notes: ``` *➜ **9:10:46 * DEVELOPER_DIR=/Applications/Xcode-beta.app swift Welcome to Apple Swift version 3.0.1 (swiftlang-800.0.56 clang-800.0.42). Type :help for assistance. 1> struct Header { 2. var x: Int 3. var y: Float 4. } 5. 6. var header = Header(x: 0, y: 0.0) 7. var byteBuffer = [UInt8]() 8. withUnsafeBytes(of: &header) { (bytes: UnsafeRawBufferPointer) in 9. byteBuffer += bytes 10. } 11. 12. let intArray = [1, 2, 3] 13. 14. intArray.withUnsafeBytes { (bytes: UnsafeRawBufferPointer) in 15. byteBuffer += bytes 16. } error: repl.swift:8:1: error: use of unresolved identifier 'withUnsafeBytes' withUnsafeBytes(of: &header) { (bytes: UnsafeRawBufferPointer) in ^~~~~~~~~~~~~~~ error: repl.swift:8:40: error: use of undeclared type 'UnsafeRawBufferPointer' withUnsafeBytes(of: &header) { (bytes: UnsafeRawBufferPointer) in ^~~~~~~~~~~~~~~~~~~~~~ error: repl.swift:14:36: error: use of undeclared type 'UnsafeRawBufferPointer' intArray.withUnsafeBytes { (bytes: UnsafeRawBufferPointer) in ^~~~~~~~~~~~~~~~~~~~~~ 1> ``` Am I missing something needed for using them? Thanks, Norio Nomura @norio_nomura
_______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev