4 ms·
> Move is a swap with a constraint that the destination be empty. Is there actually any constraint here? I thought the only constraint on a moved-from object i
by santaclaus 11y ago
> Move is a swap with a constraint that the destination be empty.
Is there actually any constraint here? I thought the only constraint on a moved-from object is that you can't use it in the current state.
- pbsd 11y agoThe standard defines moved from objects (standard library types, at least) to be in a 'valid but unspecified state'. For container types like std::vector, 'valid but unspecified' usually means empty.