primary template complex<T> | | |
1 | complex( const T& re = T(), const T& im = T() );
|
| (1) | (until C++14) |
1 | constexpr complex( const T& re = T(), const T& im = T() );
|
| (1) | (since C++14) |
1 | complex( const complex& other );
|
| (2) | (until C++14) |
1 | constexpr complex( const complex& other );
|
| (2) | (since C++14) |
1 2 | template < class X >
complex( const complex<X>& other);
|
| (3) | (until C++14) |
1 2 | template < class X >
constexpr complex( const complex<X>& other);
|
| (3) | (since C++14) |
specialization complex<float> | | |
1 | complex( float re = 0.0f, float im = 0.0f);
|
| (1) | (until C++11) |
1 | constexpr complex( float re = 0.0f, float im = 0.0f);
|
| (1) | (since C++11) |
1 2 | explicit complex( const complex< double >& other);
explicit complex( const complex< long double >& other);
|
| (3) | (until C++11) |
1 2 | explicit constexpr complex( const complex< double >& other);
explicit constexpr complex( const complex< long double >& other);
|
| (3) | (since C++11) |
specialization complex<double> | | |
1 | complex( double re = 0.0, double im = 0.0);
|
| (1) | (until C++11) |
1 | constexpr complex( double re = 0.0, double im = 0.0);
|
| (1) | (since C++11) |
1 2 | complex( const complex< float >& other);
explicit complex( const complex< long double >& other);
|
| (3) | (until C++11) |
1 2 | constexpr complex( const complex< float >& other);
explicit constexpr complex( const complex< long double >& other);
|
| (3) | (since C++11) |
specialization complex<long double> | | |
1 | complex( long double re = 0.0L, long double im = 0.0L);
|
| (1) | (until C++11) |
1 | constexpr complex( long double re = 0.0L, long double im = 0.0L);
|
| (1) | (since C++11) |
1 2 | complex( const complex< float >& other);
complex( const complex< double >& other);
|
| (3) | (until C++11) |
1 2 | constexpr complex( const complex< float >& other);
constexpr complex( const complex< double >& other);
|
| (3) | (since C++11) |
Constructs the std::complex
object.
1) Constructs the complex number from real and imaginary parts.
2) Copy constructor. Constructs the object with the copy of the contents of other
. The copy constructor is implicit in the standard specializations.
Parameters
re | - | the real part |
im | - | the imaginary part |
other | - | another complex to use as source |
See also
| assigns the contents (public member function) |
| A std::complex literal representing pure imaginary number (function) |
C documentation for CMPLX |
Please login to continue.