As far as I understand one of the purposes of adding move semantics is to optimize code by calling special constructor for copying \"temporary\" objects. For example, in th
This line calls the first constructor.
stuff a(5),b(7);
Plus operator is called using explicit common lvalue references.
stuff c = a + b;
Inside operator overload method, you have no copy constructor called. Again, the first constructor is called only.
stuff g(lhs.x+rhs.x);
assigment is made with RVO, so no copy is need. NO copy from returned object to 'c' is need.
stuff c = a+b;
Due no std::cout reference, compiler take care about your c value is never used. Then, whole program is stripped out, resulting in a empty program.