Skip to content

[cxx-interop] Add UnsafeCxxMutableInputIterator protocol #67536

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 1 commit into from
Jul 26, 2023

Conversation

egorzhdan
Copy link
Contributor

This is an inheritor of the existing UnsafeCxxInputIterator protocol, with the only difference being the ability to mutate var pointee via a non-const operator*().

This is needed to support mutable subscripts for std::map via CxxDictionary.

rdar://105399019

@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Jul 26, 2023
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@hyp
Copy link
Contributor

hyp commented Jul 26, 2023

This shouldn't be source breaking , correct?

@egorzhdan
Copy link
Contributor Author

Yeap, this is purely additive, we're just adding a new protocol and auto-conforming some types to it

This is an inheritor of the existing `UnsafeCxxInputIterator` protocol, with the only difference being the ability to mutate `var pointee` via a non-const `operator*()`.

This is needed to support mutable subscripts for `std::map` via `CxxDictionary`.

rdar://105399019
@egorzhdan egorzhdan force-pushed the egorzhdan/unsafe-cxx-mutable-input-iterator branch from 04adc26 to 8d7d0ef Compare July 26, 2023 17:21
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan changed the title [cxx-interop] Add UnsafeMutableCxxInputIterator protocol [cxx-interop] Add UnsafeCxxMutableInputIterator protocol Jul 26, 2023
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test Linux

1 similar comment
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test Linux

@egorzhdan egorzhdan merged commit 276a232 into main Jul 26, 2023
@egorzhdan egorzhdan deleted the egorzhdan/unsafe-cxx-mutable-input-iterator branch July 26, 2023 21:15
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.

2 participants