4 ms·
You could equally say that destroying a const object changes its state, so you can't destroy const objects, but that would not be true! So I don't think this i
by fancyfredbot 5y ago
You could equally say that destroying a const object changes its state, so you can't destroy const objects, but that would not be true! So I don't think this is exactly obvious, although I do like it as a way to explain the decision.
- gpderetta 5y agoBut destroying an object, by definition, does not leave an object around, so no state change can be observed. If you had destructive moves, then definitely moving from const objects could be a thing.