c++,rvo,nrvo
They are different. Bar Foo(); returns by value, the local object is copied. const string &manip(); returns by reference, a local object itself is returned, and reference is invalid in the same time the function returns....