29 Numerics library [numerics]

29.5 Complex numbers [complex.numbers]

29.5.9 Additional overloads [cmplx.over]

The following function templates shall have additional overloads:
arg                   norm
conj                  proj
imag                  real
where norm, conj, imag, and real are constexpr overloads.
The additional overloads shall be sufficient to ensure:
  • If the argument has type long double, then it is effectively cast to complex<long double>.
  • Otherwise, if the argument has type double or an integer type, then it is effectively cast to complex<​double>.
  • Otherwise, if the argument has type float, then it is effectively cast to complex<float>.
Function template pow shall have additional overloads sufficient to ensure, for a call with at least one argument of type complex<T>:
  • If either argument has type complex<long double> or type long double, then both arguments are effectively cast to complex<long double>.
  • Otherwise, if either argument has type complex<double>, double, or an integer type, then both arguments are effectively cast to complex<double>.
  • Otherwise, if either argument has type complex<float> or float, then both arguments are effectively cast to complex<float>.