std::complex<T>::operator+=,-=,*=,/=
From cppreference.com
 
 
 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Numerics library 
  
 
 
 
 
 
 
 Mathematical special functions (C++17)
 Mathematical constants (C++20)
 Basic linear algebra algorithms (C++26)
 Data-parallel types (SIMD) (C++26)
 Floating-point environment (C++11)
 Bit manipulation (C++20)
 Saturation arithmetic (C++26)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
std::complex 
  
 
 
 
 
 
 
 
complex::operator+=complex::operator-=complex::operator*=complex::operator/=
(until C++20)  
(C++26)
  (C++26)
(C++26)
Primary template 
 
 
complex<T> 
 (1)
 
complex& operator+=( const T& other );
 
 (until C++20)
constexpr complex& operator+=( const T& other );
 
 (since C++20) 
 
 (2)
 
complex& operator-=( const T& other );
 
 (until C++20)
constexpr complex& operator-=( const T& other );
 
 (since C++20) 
 
 (3)
 
complex& operator*=( const T& other );
 
 (until C++20)
constexpr complex& operator*=( const T& other );
 
 (since C++20) 
 
 (4)
 
complex& operator/=( const T& other );
 
 (until C++20)
constexpr complex& operator/=( const T& other );
 
 (since C++20) 
Specialization 
 
 
complex<float> 
 (1)
 
complex& operator+=( float other );
 
 (until C++20)
constexpr complex& operator+=( float other );
 
 (since C++20) 
 
 (2)
 
complex& operator-=( float other );
 
 (until C++20)
constexpr complex& operator-=( float other );
 
 (since C++20) 
 
 (3)
 
complex& operator*=( float other );
 
 (until C++20)
constexpr complex& operator*=( float other );
 
 (since C++20) 
 
 (4)
 
complex& operator/=( float other );
 
 (until C++20)
constexpr complex& operator/=( float other );
 
 (since C++20) 
Specialization 
 
 
complex<double> 
 (1)
 
complex& operator+=( double other );
 
 (until C++20)
constexpr complex& operator+=( double other );
 
 (since C++20) 
 
 (2)
 
complex& operator-=( double other );
 
 (until C++20)
constexpr complex& operator-=( double other );
 
 (since C++20) 
 
 (3)
 
complex& operator*=( double other );
 
 (until C++20)
constexpr complex& operator*=( double other );
 
 (since C++20) 
 
 (4)
 
complex& operator/=( double other );
 
 (until C++20)
constexpr complex& operator/=( double other );
 
 (since C++20) 
Specialization 
 
 
complex<long double> 
 (1)
 
complex& operator+=( long double other );
 
 (until C++20)
constexpr complex& operator+=( long double other );
 
 (since C++20) 
 
 (2)
 
complex& operator-=( long double other );
 
 (until C++20)
constexpr complex& operator-=( long double other );
 
 (since C++20) 
 
 (3)
 
complex& operator*=( long double other );
 
 (until C++20)
constexpr complex& operator*=( long double other );
 
 (since C++20) 
 
 (4)
 
complex& operator/=( long double other );
 
 (until C++20)
constexpr complex& operator/=( long double other );
 
 (since C++20) 
All specializations
 
 
 
 (5)
 
template<class X>
complex& operator+=( const std::complex <X>& other );
 
 (until C++20)
complex& operator+=( const std::complex <X>& other );
template<class X>
constexpr complex& operator+=( const std::complex <X>& other );
 
 (since C++20) 
constexpr complex& operator+=( const std::complex <X>& other );
 
 (6)
 
template<class X>
complex& operator-=( const std::complex <X>& other );
 
 (until C++20)
complex& operator-=( const std::complex <X>& other );
template<class X>
constexpr complex& operator-=( const std::complex <X>& other );
 
 (since C++20) 
constexpr complex& operator-=( const std::complex <X>& other );
 
 (7)
 
template<class X>
complex& operator*=( const std::complex <X>& other );
 
 (until C++20)
complex& operator*=( const std::complex <X>& other );
template<class X>
constexpr complex& operator*=( const std::complex <X>& other );
 
 (since C++20) 
constexpr complex& operator*=( const std::complex <X>& other );
 
 (8)
 
template<class X>
complex& operator/=( const std::complex <X>& other );
 
 (until C++20)
complex& operator/=( const std::complex <X>& other );
template<class X>
constexpr complex& operator/=( const std::complex <X>& other );
 
 (since C++20) 
constexpr complex& operator/=( const std::complex <X>& other );
Implements the compound assignment operators for complex arithmetic and for mixed complex/scalar arithmetic. Scalar arguments are treated as complex numbers with the real part equal to the argument and the imaginary part set to zero.
1,5) Adds 
other to *this.2,6) Subtracts 
other from *this.3,7) Multiplies *this by 
other.4,8) Divides *this by 
other.[edit] Parameters
 other
 -
 a complex or scalar value of matching type (float, double, long double)
[edit] Return value
*this
[edit] See also
 
 performs complex number arithmetic on two complex values or a complex and a scalar 
(function template) [edit]
(function template) [edit]