Do the high level object constructs help c++ apply optimizations?

I am looking for specific snippets in which properly declaring object lifetimes allows the compiler to perform optimizations it otherwise could not. The closest I have come to finding something like that is through the strict aliasing rule, but of course this is more a type punning sort of thing rather that lifetime related.

Do you have any specific examples in mind?

I’d expect a (space) optimization opportunity between moving the object out and destructing moved-out object, if that helps.