complex::operator+=

complex& operator+=(const complex& rhs);
complex& operator+=(const T& rhs);

The first member function replaces the stored real and imaginary parts with those corresponding to the complex sum of *this and rhs. It then returns *this.

The second member function adds rhs to the stored real part. It then returns *this.

In this implementation, if a translator does not support member template functions, the template:

template<class U>
    complex& operator+=(const complex<U>& rhs);

is replaced by:

complex& operator+=(const complex& rhs);