std::complex::operator=(3)

NAME
std::complex::operator= - std::complex::operator=

Synopsis
   Primary template complex<T>
   complex& operator=( const T& (until
   x ); C++20)
   constexpr complex& (since
   operator=( const T& x ); C++20)
   Specialization
   complex<float>
   complex& operator=( float x (until
   ); C++20)
   constexpr complex& (since
   operator=( float x ); C++20)
   Specialization
   complex<double>
   complex& operator=( double x (until
   ); C++20)
   constexpr complex& (since
   operator=( double x ); C++20)
   Specialization complex<long
   double> (1)
   complex& operator=( long (until
   double x ); C++20)
   constexpr complex& (1) (since
   operator=( long double x ); C++20)
   All specializations
   complex& operator=( const (1) (until
   complex& cx ); C++20)
   constexpr complex& (since
   operator=( const complex& cx (1) C++20)
   );
   template< class X > (2) (until
   complex& operator=( const C++20)
   std::complex<X>& cx );
   template< class X > (3)
   constexpr complex& (since
   operator=( const C++20)
   std::complex<X>& cx );
   Assigns new values to the contents.
   1) Assigns x to the real part of the complex number. Imaginary part is set to zero.
   2,3) Assigns cx.real() and cx.imag() to the real and the imaginary parts of the
   complex number respectively.

Parameters
   x - value to assign
   cx - complex value to assign

Return value
   *this

See also
   constructor constructs a complex number
                 (public member function)
   operator""if
   operator""i A std::complex literal representing pure imaginary number
   operator""il (function)
   (C++14)