Like I said before, that's not what value semantics means.
For example, I could ask for t.size() at all times, because t was a value and would still be there after a move.
... and the result you'd get after a move would be meaningless and you'd be able to do nothing with it.
because indirect has an additional pointer-like semantic:
No, it is not pointer-like semantics. It is value semantics. What you're complaining about is that you can't use it after a move. But you can't use anything after a move. That has nothing to do with pointers.
It would be much better if it had value semantics.
It does. You're just confused about how values in general behave.
View all comments
Show parent comment
4
u/wyrn Aug 16 '26
Like I said before, that's not what value semantics means.
... and the result you'd get after a move would be meaningless and you'd be able to do nothing with it.
No, it is not pointer-like semantics. It is value semantics. What you're complaining about is that you can't use it after a move. But you can't use anything after a move. That has nothing to do with pointers.
It does. You're just confused about how values in general behave.
Like I said. Watch Sean's explanation.