Skip to content

Commit bd43857

Browse files
committed
[cxx-interop] Change the hierarchy of CxxSequence protocols
This makes `CxxConvertibleToCollection` the base protocol in the hierarchy. Both `CxxSequence` and `CxxRandomAccessCollection` now inherit from `CxxConvertibleToCollection`.
1 parent dc1b73f commit bd43857

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/Cxx/CxxSequence.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ extension Optional: UnsafeCxxInputIterator where Wrapped: UnsafeCxxInputIterator
6565
/// This requires the C++ sequence type to define const methods `begin()` and
6666
/// `end()` which return input iterators into the C++ sequence. The iterator
6767
/// types must conform to `UnsafeCxxInputIterator`.
68-
public protocol CxxSequence<Element>: Sequence {
68+
public protocol CxxSequence<Element>: CxxConvertibleToCollection, Sequence {
6969
override associatedtype Element
70-
associatedtype RawIterator: UnsafeCxxInputIterator
70+
override associatedtype RawIterator: UnsafeCxxInputIterator
7171
where RawIterator.Pointee == Element
7272
override associatedtype Iterator = CxxIterator<Self>
7373

0 commit comments

Comments
 (0)