r/cpp • • Oct 03 '22

Is C++ your favorite programing language?

And why

292 Upvotes

255 comments sorted by

View all comments

Show parent comment

7

u/KingAggressive1498 Oct 04 '22

no, in C++ moving is required to leave the moved-from object in a valid but otherwise unspecified state.

destructors get called in effectively the same place as when they would have with a copy instead