by sprocketz · 2mo ago · 0 comments
Liveness of objects for move/drop semantics is tracked differently, without any syntax and with implicit runtime drop flags where necessary.
C++ could probably add the same deinitialized/moved-from state tracking (with an opt-in for back compat sake) purely to avoid dtor bloat, without having to add safety of borrow checking.
There is a lot of talk in the C++ committee about this. The details are complex in some obscure cases.
Most code doesn't have the shared memory setups where deferred destruction is necessary.