mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[cxx-interop] Synthesize conformances to CxxRandomAccessCollection
This makes ClangImporter automatically conform C++ collection types to `Cxx.CxxRandomAccessCollection` protocol. We consider a C++ sequence type to be a random access collection type its iterator conforms to `UnsafeCxxRandomAccessIterator`.
This commit is contained in:
@@ -12,12 +12,6 @@
|
||||
// CHECK: typealias RawIterator = ConstIteratorOutOfLineEq
|
||||
// CHECK: }
|
||||
|
||||
// CHECK: struct SimpleArrayWrapper : CxxSequence {
|
||||
// CHECK: typealias Element = UnsafePointer<Int32>.Pointee
|
||||
// CHECK: typealias Iterator = CxxIterator<SimpleArrayWrapper>
|
||||
// CHECK: typealias RawIterator = UnsafePointer<Int32>
|
||||
// CHECK: }
|
||||
|
||||
// CHECK: struct SimpleArrayWrapperNullableIterators : CxxSequence {
|
||||
// CHECK: typealias Element = Optional<UnsafePointer<Int32>>.Pointee
|
||||
// CHECK: typealias Iterator = CxxIterator<SimpleArrayWrapperNullableIterators>
|
||||
|
||||
Reference in New Issue
Block a user