Skip to content

🍒[cxx-interop] Make std.optional.value nullable #65944

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
May 16, 2023

Conversation

egorzhdan
Copy link
Contributor

@egorzhdan egorzhdan commented May 16, 2023

Explanation: This makes the access to std::optional's wrapped value null-safe in Swift. It also allows using if-let and guard-let with C++ optionals.
Scope: Only affects the C++ standard library overlay.
Risk: Low, this only has an effect if C++ interop is enabled and the C++ stdlib is used from Swift.

rdar://109356566 / resolves #65918 (cherry picked from commit 7d78255)

rdar://109356566 / resolves #65918
(cherry picked from commit 7d78255)
@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label May 16, 2023
@egorzhdan egorzhdan requested a review from a team as a code owner May 16, 2023 12:24
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan
Copy link
Contributor Author

@swift-ci please test

@egorzhdan egorzhdan requested a review from hyp May 16, 2023 12:39
@egorzhdan egorzhdan merged commit 6923717 into release/5.9 May 16, 2023
@egorzhdan egorzhdan deleted the egorzhdan/5.9-cxx-optional-nullable-value branch May 16, 2023 17:14
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