Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



The 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: