-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Add UnsafeCxxContiguousIterator
& UnsafeCxxMutableContiguousIterator
protocols
#77006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cbd533d
to
49eb805
Compare
@swift-ci please smoke test |
49eb805
to
046d1ad
Compare
@@ -916,62 +1147,6 @@ struct InputOutputConstIterator { | |||
} | |||
}; | |||
|
|||
struct MutableRACIterator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(had to move this elsewhere in the file with no source changes)
046d1ad
to
855cfba
Compare
@swift-ci please smoke test |
855cfba
to
2439be9
Compare
@swift-ci please smoke test |
2439be9
to
0755e24
Compare
@swift-ci please smoke test |
@swift-ci Please Build Toolchain Ubuntu 22.04 |
@swift-ci Please Build Toolchain Amazon Linux 2 |
@swift-ci Please Build Toolchain Debian 12 |
@swift-ci Please Build Toolchain Fedora 39 |
…ntiguousIterator` protocols This adds a pair of Swift protocols that represents C++ iterator types conforming to `std::contiguous_iterator_tag` requirements. These are random access iterators that guarantee that the values are stored in consequent memory addresses. This will be used to optimize usage of C++ containers such as `std::vector` from Swift, for instance, by providing an overload of `withContiguousStorageIfAvailable` for contiguous containers. rdar://137877849
0755e24
to
3a200de
Compare
@swift-ci please smoke test |
@swift-ci Please Build Toolchain Amazon Linux 2 |
This adds a pair of Swift protocols that represents C++ iterator types conforming to
std::contiguous_iterator_tag
requirements. These are random access iterators that guarantee that the values are stored in consequent memory addresses.This will be used to optimize usage of C++ containers such as
std::vector
from Swift, for instance, by providing an overload ofwithContiguousStorageIfAvailable
for contiguous containers.rdar://137877849