Skip to content

Commit 5359c13

Browse files
committed
[cxx-interop] Add explicit typealiases to CxxRandomAccessCollection
This will help us to auto-generate conformances to `CxxRandomAccessCollection`, since synthesized conformances must have all of their witnesses explicitly provided.
1 parent 04dd839 commit 5359c13

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stdlib/public/Cxx/CxxRandomAccessCollection.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ extension UnsafeMutablePointer: UnsafeCxxRandomAccessIterator {}
3131
public protocol CxxRandomAccessCollection: CxxSequence, RandomAccessCollection {
3232
override associatedtype RawIterator: UnsafeCxxRandomAccessIterator
3333
override associatedtype Element = RawIterator.Pointee
34+
override associatedtype Index = Int
35+
override associatedtype Indices = Range<Int>
36+
override associatedtype SubSequence = Slice<Self>
3437

3538
/// Do not implement this function manually in Swift.
3639
func __beginUnsafe() -> RawIterator

0 commit comments

Comments
 (0)