C++11 introduced move semantic, which allows, as its name suggests, to move objects instead of copying them.
The move process typically involves copying pointers to some resources, and then setting the original pointers to
nullptr, so they cannot be used to access the resources anymore.
Of course, all of this is done transparently to the user of the class.
With this power comes a complexity, which is enhanced when it is coupled with copy elision. Copy elision is the general process where, when returned from a function, an object is not copied nor moved, resulting in zero-copy pass-by-value semantics. It includes both return value optimization (RVO) and named return value optimization (NRVO).
While the links on cppreference provided above probably contain all the information you might want to know about the interaction of move semantic with copy elision, they can be a bit of an arid reading.
The goal of this post is to give a quick and incomplete introduction on the subject.
This introduction is then used to present an interesting difference between the
clang++ 3.8 compilers.