swift icon indicating copy to clipboard operation
swift copied to clipboard

[interop] Tracking issue to track support for immutable noncopyable borrows for C++ types in Swift

Open hyp opened this issue 3 years ago • 2 comments

We want to immutably borrow C++ types so that they can't be copied implicitly. A prime example of it is std::vector, which we want to pass into const std::vector & , or a call a const method on.

This issue is a tracking issue that tracks overall support for this feature in Swift. I will post updates here.

hyp avatar Oct 05 '22 18:10 hyp

Let's not prioritize this for Swift 5.9

hyp avatar May 15 '23 18:05 hyp

Actually this appears to be still on track for 5.9.

hyp avatar Jun 07 '23 19:06 hyp

This appears to work! I'm just going to add a test case for our expected patterns.

hyp avatar Jun 15 '23 22:06 hyp

This works in 5.9 as well :)

hyp avatar Jul 14 '23 21:07 hyp