15#ifndef dealii_complex_overloads_h
16#define dealii_complex_overloads_h
26template <
typename T,
typename U>
30#ifndef DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS
38template <
typename T,
typename U>
39inline std::enable_if_t<
40 std::is_floating_point_v<T> && std::is_floating_point_v<U>,
42operator*(
const std::complex<T> &left,
const std::complex<U> &right)
46 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
56template <
typename T,
typename U>
57inline std::enable_if_t<
58 std::is_floating_point_v<T> && std::is_floating_point_v<U>,
60operator/(
const std::complex<T> &left,
const std::complex<U> &right)
64 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
74template <
typename T,
typename U>
75inline std::enable_if_t<std::is_floating_point_v<T> &&
76 std::is_floating_point_v<U>,
78operator*(
const std::complex<T> &left,
const U &right)
81 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
91template <
typename T,
typename U>
92inline std::enable_if_t<std::is_floating_point_v<T> &&
93 std::is_floating_point_v<U>,
95operator/(
const std::complex<T> &left,
const U &right)
98 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
108template <
typename T,
typename U>
109inline std::enable_if_t<std::is_floating_point_v<T> &&
110 std::is_floating_point_v<U>,
115 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
125template <
typename T,
typename U>
126inline std::enable_if_t<std::is_floating_point_v<T> &&
127 std::is_floating_point_v<U>,
132 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)