Uploaded image for project: 'Swift'
  1. Swift
  2. SR-3631

Introduce ContiguouslyStored protocol and kill ArraySlice type

    XMLWordPrintable

    Details

      Description

      Sketch:

      protocol ContiguouslyStored : RandomAccessCollection {
        func withUnsafeBufferPointer<R>(...) -> R
        mutating func withUnsafeMutableBufferPointer<R>(...) -> R
      }
      
      extension Slice : ContiguouslyStored where Base : ContiguouslyStored {
        func withUnsafeBufferPointer<R>(...) -> R { ... }
        mutating func withUnsafeMutableBufferPointer<R>(...) -> R { ... }
      }
      
      typealias ArraySlice<T> = Slice<Array<T>>
      

      (This is related to https://bugs.swift.org/browse/SR-3633)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dabrahams Dave Abrahams
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated: