[swift-evolution] [swift-evolution-announce] [Review] SE-0107: UnsafeRawPointer API
Dave Abrahams
dabrahams at apple.com
Tue Jul 5 17:36:46 CDT 2016
on Sat Jul 02 2016, Brent Royal-Gordon <swift-evolution at swift.org> wrote:
> One ridiculous thing we could do for `moveAssign(from:count:)` and
> perhaps `move()` is to deliberately make `self` invalid by setting it
> to address 0. If it were `Optional`, this would nil `self`. If it
> weren't...well, something would probably fail eventually.
It wouldn't be ridiculous at all to do this in debug builds. I would
consider whether there's a better “trap” value than 0 that we could
write in there.
--
Dave
More information about the swift-evolution
mailing list