26
Numerics library
[numerics]
26.4
Complex numbers
[complex.numbers]
26.4.9
Additional overloads
[cmplx.over]
1
#
The following function templates shall have additional overloads:
arg norm conj proj imag real
where
norm
,
conj
,
imag
, and
real
are
constexpr
overloads
.
2
#
The additional overloads shall be sufficient to ensure:
(2.1)
If the argument has type
long
double
, then it is effectively cast to
complex
<
long
double
>
.
(2.2)
Otherwise, if the argument has type
double
or an integer type, then it is effectively cast to
complex
<
double
>
.
(2.3)
Otherwise, if the argument has type
float
, then it is effectively cast to
complex
<
float
>
.
3
#
Function template
pow
shall have additional overloads sufficient to ensure, for a call with at least one argument of type
complex
<
T
>
:
(3.1)
If either argument has type
complex
<
long
double
>
or type
long
double
, then both arguments are effectively cast to
complex
<
long
double
>
.
(3.2)
Otherwise, if either argument has type
complex
<
double
>
,
double
, or an integer type, then both arguments are effectively cast to
complex
<
double
>
.
(3.3)
Otherwise, if either argument has type
complex
<
float
>
or
float
, then both arguments are effectively cast to
complex
<
float
>
.