Namespaces
Variants
Views
Actions

std::complex::complex

From cppreference.com
< cpp‎ | numeric‎ | complex
Revision as of 11:31, 22 May 2013 by Dieram3 (Talk | contribs)

Template:ddcl list begin <tr class="t-dcl ">

<td >
constexpr complex( const T& re = T(), const T& im = T() );
</td>

<td > (1) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">

<td >
constexpr complex( const complex& other );
</td>

<td > (2) </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

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.

Parameters

re - the real part
im - the imaginary part
other - another complex to use as source

Notes

Constructors are marked as constexpr since c++14

See also

Template:cpp/numeric/complex/dcl list operator=