Skip to content

[cxx-interop] Add CxxRandomAccessCollection protocol #61554

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

Merged
merged 2 commits into from
Oct 19, 2022

Conversation

egorzhdan
Copy link
Contributor

This helps to bridge C++ random access collections, such as std::vector and std::string, to Swift by conforming them to Swift.RandomAccessCollection.

@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Oct 12, 2022
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan force-pushed the egorzhdan/cxx-random-access-collection branch from 0e52c17 to 4a93e95 Compare October 14, 2022 12:36
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

This helps to bridge C++ random access collections, such as `std::vector` and `std::string`, to Swift by conforming them to `Swift.RandomAccessCollection`
@egorzhdan egorzhdan force-pushed the egorzhdan/cxx-random-access-collection branch from 4a93e95 to bc16131 Compare October 14, 2022 16:40
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test macOS

@egorzhdan egorzhdan marked this pull request as ready for review October 14, 2022 22:57
Copy link
Contributor

@zoecarver zoecarver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really great. As always, a very high quality patch. Thanks Egor!

@zoecarver
Copy link
Contributor

It will be interesting to see how this changes any std::vector benchmarks (maybe we should add some more).

@zoecarver
Copy link
Contributor

And I assume you'll add automatic conformance in a follow up patch?

@egorzhdan
Copy link
Contributor Author

Sure, I'll add automatic conformances in another patch.

@egorzhdan
Copy link
Contributor Author

@swift-ci please benchmark

@hyp
Copy link
Contributor

hyp commented Oct 17, 2022

benchmark is disabled for now so you won't get results

@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test Windows

@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test Linux

@egorzhdan egorzhdan merged commit 3daa875 into main Oct 19, 2022
@egorzhdan egorzhdan deleted the egorzhdan/cxx-random-access-collection branch October 19, 2022 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants