16 #ifndef dealii_complex_overloads_h
17 #define dealii_complex_overloads_h
27 template <
typename T,
typename U>
31 #ifndef DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS
39 template <
typename T,
typename U>
40 inline std::enable_if_t<
41 std::is_floating_point_v<T> && std::is_floating_point_v<U>,
43 operator*(
const std::complex<T> &left,
const std::complex<U> &right)
47 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
57 template <
typename T,
typename U>
58 inline std::enable_if_t<
59 std::is_floating_point_v<T> && std::is_floating_point_v<U>,
61 operator/(
const std::complex<T> &left,
const std::complex<U> &right)
65 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
75 template <
typename T,
typename U>
76 inline std::enable_if_t<std::is_floating_point_v<T> &&
77 std::is_floating_point_v<U>,
82 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
92 template <
typename T,
typename U>
93 inline std::enable_if_t<std::is_floating_point_v<T> &&
94 std::is_floating_point_v<U>,
99 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
109 template <
typename T,
typename U>
110 inline std::enable_if_t<std::is_floating_point_v<T> &&
111 std::is_floating_point_v<U>,
116 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
126 template <
typename T,
typename U>
127 inline std::enable_if_t<std::is_floating_point_v<T> &&
128 std::is_floating_point_v<U>,
133 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
typename internal::ProductTypeImpl< std::decay_t< T >, std::decay_t< U > >::type type
std::enable_if_t< std::is_floating_point_v< T > &&std::is_floating_point_v< U >, typename ProductType< T, std::complex< U > >::type > operator/(const T &left, const std::complex< U > &right)
std::enable_if_t< std::is_floating_point_v< T > &&std::is_floating_point_v< U >, typename ProductType< std::complex< T >, U >::type > operator/(const std::complex< T > &left, const U &right)
std::enable_if_t< std::is_floating_point_v< T > &&std::is_floating_point_v< U >, typename ProductType< std::complex< T >, std::complex< U > >::type > operator/(const std::complex< T > &left, const std::complex< U > &right)
std::enable_if_t< std::is_floating_point_v< T > &&std::is_floating_point_v< U >, typename ProductType< T, std::complex< U > >::type > operator*(const T &left, const std::complex< U > &right)
std::enable_if_t< std::is_floating_point_v< T > &&std::is_floating_point_v< U >, typename ProductType< std::complex< T >, std::complex< U > >::type > operator*(const std::complex< T > &left, const std::complex< U > &right)
std::enable_if_t< std::is_floating_point_v< T > &&std::is_floating_point_v< U >, typename ProductType< std::complex< T >, U >::type > operator*(const std::complex< T > &left, const U &right)