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!
138
Upvotes
View all comments
Show parent comment
1
u/Fabulous-Meaning-966 Feb 19 '26
Move semantics ruins the idea of constructors-as-invariant-guarantee, if the constructor-established invariant is incompatible with the moved-from state. This is one half of RAII, so a pretty big deal.