Function Dune::XT::Common::create_real_or_complex_number

Function template Dune::XT::Common::create_real_or_complex_number

template<class T>
T Dune::XT::Common::create_real_or_complex_number(const std::enable_if_t<is_complex<T>::value, real_t<T>> real_part, const real_t<T> imag_part)

creates a complex number from the given real and imaginary parts

Function template Dune::XT::Common::create_real_or_complex_number

template<class T>
T Dune::XT::Common::create_real_or_complex_number(const std::enable_if_t<std::is_arithmetic<T>::value, real_t<T>> real_part, const real_t<T> imag_part)

creates a real number from real and imaginary parts, throwing if the imaginary part is non-zero