I have two pieces of code here to show you. They are two classes and each one provides a Move Constructor and a function which returns a temporary.
The copy elision is an optimization that, nowadays, every modern compiler provides.
When returning huge class objects in C++, this technique applies... but not in every case!
In the first example, the compiler performs the Move Constructor because we have more than one return statement in the function.