Skip to content

[5.9][interop][SwiftToCxx] add swift::String overlay constructor for const… #65754

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

hyp
Copy link
Contributor

@hyp hyp commented May 8, 2023

…ructing it directly from a C string literal

resolves #63448

Explanation: It was not possible to construct swift::String type that represents Swift's String type in C++ from a C++ string literal / C string. This change adds a new C++ constructor to this type to ensure that it can be implicitly constructed from a string literal / C string.
Scope: Swift's and C++ interoperability, Swift's standard library overlay for C++.
Risk: Low. This type is not adopted yet in C++ adopters.
Testing: Swift unit tests, manual testing on some adopter projects and several Swift packages that import C.
PR: #65683
Reviewer: @egorzhdan

@hyp hyp added c++ interop Feature: Interoperability with C++ swift 5.9 labels May 8, 2023
@hyp hyp requested a review from a team as a code owner May 8, 2023 05:47
@hyp
Copy link
Contributor Author

hyp commented May 8, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented May 8, 2023

@swift-ci please test source compatibility

@hyp hyp merged commit ea9bb20 into swiftlang:release/5.9 May 8, 2023
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++ swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants