Modem C++ compiler will implement: given a type T:
If T has an accessible copy or move constructor, the compiler may
choose to elide the copy. This is the so-called (named) return value
optimization (RVO), which was specified even before C++11 and is
supported by most compilers.
Otherwise, if T has a move constructor, T is moved(Since C++11).
Otherwise, if T has a copy constructor, T is copied.