考虑以下几点:ComplexObjectfoo(){ComplexObjecttemp;//DothingswithtempComplexObjectresult(temp,SOME_OTHER_SETTING);//1//Dothingswithresult.Donotusetempatallreturnresult;//2}ComplexObjectfoo(){ComplexObjecttemp;//DothingswithtempComplexObjectresult(std::move(temp),SOME_OTHER_SETTING);//1//Dothingswithres