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

When you say you must, do you mean that it’s best practice, that or that this is UB or similar?


> When you say you must, do you mean that it’s best practice, that or that this is UB or similar?

I'm not OP, but the only requirements that C++ imposed on moved-from objects is that they remain valid objects. Meaning, they can be safely destroyed or reused by reassigning or even moving other objects into them. I have no idea what OP could be possibly referring to.




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

Search: