mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The reason why we are doing this is that this combination of read/set forces the compiler to emit a copy if we want to emit a modify operation. The reason why we are forced to emit such a copy is that: 1. _read provides a guaranteed value in memory 2. performing a modify requires an owned value in memory. This together implies that the only way we can do this is to copy from the _read into temporary memory. But we have a noncopyable type so we can't do this. rdar://112915525
2.5 KiB
2.5 KiB