<div dir="ltr">I'm wondering about this too.<div><br><div>Xcode 8.1 beta 3 doesn't seem to include any of the pointer-related stuff mentioned in the release notes section New in Xcode 8.1 beta 3 - Swift Compiler.</div><div><br></div><div>/Jens</div><div> </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 12, 2016 at 2:13 AM, Norio Nomura via swift-dev <span dir="ltr"><<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The release notes of Xcode 8.1 beta 3 said:<div>> <span style="font-size:11pt;font-family:myriadsetpro">Two types have been added to the Swift standard library: </span><span style="font-size:9pt;font-family:menlo;color:rgb(102,102,102)">UnsafeRawBufferPointer </span><span style="font-size:11pt;font-family:myriadsetpro">and
</span><span style="font-size:9pt;font-family:menlo;color:rgb(102,102,102)">UnsafeMutableRawBufferPointer</span><span style="font-size:11pt;font-family:myriadsetpro">.</span></div><div><br></div><div>But I'm getting errors on building sample codes in release notes:</div><div>```</div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)"><b>➜ </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(51,187,200)"><b>9:10:46 </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)"><b> </b></span><span style="font-variant-ligatures:no-common-ligatures">DEVELOPER_DIR=/Applications/Xc<wbr>ode-beta.app swift</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">Welcome to Apple Swift version 3.0.1 (swiftlang-800.0.56 clang-800.0.42). Type :help for assistance.</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(169,169,169)"> 1> </span><span style="font-variant-ligatures:no-common-ligatures">struct Header { </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(169,169,169)"> 2. </span><span style="font-variant-ligatures:no-common-ligatures"> var x: Int </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(169,169,169)"> 3. </span><span style="font-variant-ligatures:no-common-ligatures"> var y: Float </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(169,169,169)"><span style="font-variant-ligatures:no-common-ligatures"> 4. </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">} </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(169,169,169)"><span style="font-variant-ligatures:no-common-ligatures"> 5. </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(169,169,169)"> 6. </span><span style="font-variant-ligatures:no-common-ligatures">var header = Header(x: 0, y: 0.0) </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(169,169,169)"> 7. </span><span style="font-variant-ligatures:no-common-ligatures">var byteBuffer = [UInt8]() </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(169,169,169)"> 8. </span><span style="font-variant-ligatures:no-common-ligatures">withUnsafeBytes(of: &header) { (bytes: UnsafeRawBufferPointer) in </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(169,169,169)"> 9. </span><span style="font-variant-ligatures:no-common-ligatures"> byteBuffer += bytes </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(169,169,169)"><span style="font-variant-ligatures:no-common-ligatures"> 10. </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">} </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(169,169,169)"><span style="font-variant-ligatures:no-common-ligatures"> 11. </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(169,169,169)"> 12. </span><span style="font-variant-ligatures:no-common-ligatures">let intArray = [1, 2, 3] </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(169,169,169)"><span style="font-variant-ligatures:no-common-ligatures"> 13. </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(169,169,169)"> 14. </span><span style="font-variant-ligatures:no-common-ligatures">intArray.withUnsafeBytes { (bytes: UnsafeRawBufferPointer) in </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(169,169,169)"> 15. </span><span style="font-variant-ligatures:no-common-ligatures"> byteBuffer += bytes </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(169,169,169)"><span style="font-variant-ligatures:no-common-ligatures"> 16. </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">}</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">error: repl.swift:8:1: error: use of unresolved identifier 'withUnsafeBytes'</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">withUnsafeBytes(of: &header) { (bytes: UnsafeRawBufferPointer) in</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">^~~~~~~~~~~~~~~</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">error: repl.swift:8:40: error: use of undeclared type 'UnsafeRawBufferPointer'</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">withUnsafeBytes(of: &header) { (bytes: UnsafeRawBufferPointer) in</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"> ^~~~~~~~~~~~~~~~~~~~~~</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">error: repl.swift:14:36: error: use of undeclared type 'UnsafeRawBufferPointer'</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">intArray.withUnsafeBytes { (bytes: UnsafeRawBufferPointer) in</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"> ^~~~~~~~~~~~~~~~~~~~~~</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(169,169,169)"><span style="font-variant-ligatures:no-common-ligatures"> 1> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-family:arial,sans-serif;font-size:small">```</span><br></p></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">Am I missing something needed for using them?</span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">Thanks,</span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><br></span></div><div><font color="#000000">Norio Nomura @norio_nomura</font></div><div><font color="#000000"><br></font></div></div>
<br>______________________________<wbr>_________________<br>
swift-dev mailing list<br>
<a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-dev</a><br>
<br></blockquote></div><br></div>