4.7 KiB
[complex.member.ops]
29 Numerics library [numerics]
29.4 Complex numbers [complex.numbers]
29.4.5 Member operators [complex.member.ops]
constexpr complex& operator+=(const T& rhs);
Effects: Adds the scalar value rhs to the real part of the complex valuethis and stores the result in the real part ofthis, leaving the imaginary part unchanged.
Returns: *this.
constexpr complex& operator-=(const T& rhs);
Effects: Subtracts the scalar value rhs from the real part of the complex valuethis and stores the result in the real part ofthis, leaving the imaginary part unchanged.
Returns: *this.
constexpr complex& operator*=(const T& rhs);
Effects: Multiplies the scalar value rhs by the complex valuethis and stores the result inthis.
Returns: *this.
constexpr complex& operator/=(const T& rhs);
Effects: Divides the scalar value rhs into the complex valuethis and stores the result inthis.
Returns: *this.
template<class X> constexpr complex& operator=(const complex<X>& rhs);
Effects: Assigns the value rhs.real() to the real part and the value rhs.imag() to the imaginary part of the complex value *this.
Returns: *this.
template<class X> constexpr complex& operator+=(const complex<X>& rhs);
Effects: Adds the complex value rhs to the complex valuethis and stores the sum inthis.
Returns: *this.
template<class X> constexpr complex& operator-=(const complex<X>& rhs);
Effects: Subtracts the complex value rhs from the complex valuethis and stores the difference inthis.
Returns: *this.
template<class X> constexpr complex& operator*=(const complex<X>& rhs);
Effects: Multiplies the complex value rhs by the complex valuethis and stores the product inthis.
Returns: *this.
template<class X> constexpr complex& operator/=(const complex<X>& rhs);
Effects: Divides the complex value rhs into the complex valuethis and stores the quotient inthis.
Returns: *this.