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

2.1 KiB

[complex.members]

29 Numerics library [numerics]

29.4 Complex numbers [complex.numbers]

29.4.4 Member functions [complex.members]

🔗

constexpr complex(const T& re = T(), const T& im = T());

1

#

Postconditions: real() == re && imag() == im is true.

🔗

template<class X> constexpr explicit(see below) complex(const complex<X>& other);

2

#

Effects: Initializes the real part with other.real() and the imaginary part with other.imag().

3

#

Remarks: The expression inside explicit evaluates to false if and only if the floating-point conversion rank of T is greater than or equal to the floating-point conversion rank of X.

🔗

constexpr T real() const;

4

#

Returns: The value of the real component.

🔗

constexpr void real(T val);

5

#

Effects: Assigns val to the real component.

🔗

constexpr T imag() const;

6

#

Returns: The value of the imaginary component.

🔗

constexpr void imag(T val);

7

#

Effects: Assigns val to the imaginary component.