Skip to content

Commit 5c29bd2

Browse files
authored
Merge pull request #60325 from apple/egorzhdan/cxx-sequence-explicit-iterator
[cxx-interop] Explicitly require `CxxSequence`'s iterator to be `CxxIterator`
2 parents c5c3446 + 2c43038 commit 5c29bd2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/Cxx/CxxSequence.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ extension Optional: UnsafeCxxInputIterator where Wrapped: UnsafeCxxInputIterator
6666
public protocol CxxSequence: Sequence {
6767
associatedtype RawIterator: UnsafeCxxInputIterator
6868
associatedtype Element = RawIterator.Pointee
69+
associatedtype Iterator = CxxIterator<Self>
6970

7071
// `begin()` and `end()` have to be mutating, otherwise calling
7172
// `self.sequence.begin()` will copy `self.sequence` into a temporary value,

0 commit comments

Comments
 (0)