mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Unfortunately, importing them as is results in ambiguous call sites. E.g., std::vector::push_back has overloads for lvalue reference and rvalue reference and we have no way to distinguish them at the call site in Swift. To overcome this issue, functions with rvalue reference parameters are imported with 'consuming:' argument labels. Note that, in general, move only types and consuming is not properly supported in Swift yet. We do not invoke the dtor for the moved-from objects. This is a preexisting problem that can be observed with move only types before this PR, so the fix will be done in a separate PR. Fortunately, for most types, the moved-from objects do not require additional cleanups. rdar://125816354
94 KiB
94 KiB