Complex Complex::operator+ (const Complex& c) const
{
//Complex tmp;
//tmp._real = _real + c._real;
//tmp._image = _image + c._image;
//return tmp;
return Complex(_real + c._real, _image + c._image);
}
这段代码中,为什么return tmp时会调用拷贝构造函数,而 return Complex(_real + c._real, _image + c._image)不会呢?