mirror of
https://github.com/apple/swift.git
synced 2026-11-30 09:15:01 +01:00
C++ moves of Swift values that use opaque storage, such as resilient types and generic types whose layout depends on their arguments, currently copy the value into a new allocation. Transfer the allocation instead. A moved-from wrapper has no allocation, so it needs no extra state. It can be destroyed, copied, moved or assigned, and a copy of it is empty too. Accessing its Swift value aborts. Wrappers with an inline layout still copy when moved.