r/cpp • u/Little-Reflection986 • Feb 16 '26
Favorite optimizations ??
I'd love to hear stories about people's best feats of optimization, or something small you are able to use often!
133
Upvotes
View all comments
Show parent comment
2
u/max123246 Feb 19 '26
Yup, I agree. That's why it makes far more sense for a move to destroy the moved-from object instead of leaving it in a 'valid but unspecified' moved-from state.