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

> "valid, but unspecified"

Annoyingly, it depends on the type, sometimes with unintuitive consequences.

Move a unique_ptr? Guaranteed that the moved-from object is now null (fine). Move a std::optional? It remains engaged, but the wrapped object is moved-from (weird).

Move a vector? Unspecified.



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

Search: