[5.9][cxx-interop] add a testcase to verify that 'borrowing' works with co… #66693
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…pyable C++ types
This lets us verify that our suggested pattern for calling unsafe functions is working as intended in Swift
This also lets us verify that we can still pass borrowed C++ types to C++ functions that take in a const ref parameter
Tests now fixed #61454
(cherry picked from commit da8c52c)
Swift now allows
borrowing
of copyable types. We should thatborrowing
works with C++ records as well, to ensure that the pattern we suggest in the docs for calling unsafe member functions works .