Files
2025-10-25 03:02:53 +03:00

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);

1

#

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.

2

#

Returns: *this.

🔗

constexpr complex& operator-=(const T& rhs);

3

#

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.

4

#

Returns: *this.

🔗

constexpr complex& operator*=(const T& rhs);

5

#

Effects: Multiplies the scalar value rhs by the complex valuethis and stores the result inthis.

6

#

Returns: *this.

🔗

constexpr complex& operator/=(const T& rhs);

7

#

Effects: Divides the scalar value rhs into the complex valuethis and stores the result inthis.

8

#

Returns: *this.

🔗

template<class X> constexpr complex& operator=(const complex<X>& rhs);

9

#

Effects: Assigns the value rhs.real() to the real part and the value rhs.imag() to the imaginary part of the complex value *this.

10

#

Returns: *this.

🔗

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

11

#

Effects: Adds the complex value rhs to the complex valuethis and stores the sum inthis.

12

#

Returns: *this.

🔗

template<class X> constexpr complex& operator-=(const complex<X>& rhs);

13

#

Effects: Subtracts the complex value rhs from the complex valuethis and stores the difference inthis.

14

#

Returns: *this.

🔗

template<class X> constexpr complex& operator*=(const complex<X>& rhs);

15

#

Effects: Multiplies the complex value rhs by the complex valuethis and stores the product inthis.

16

#

Returns: *this.

🔗

template<class X> constexpr complex& operator/=(const complex<X>& rhs);

17

#

Effects: Divides the complex value rhs into the complex valuethis and stores the quotient inthis.

18

#

Returns: *this.