15#ifndef dealii_complex_overloads_h
16#define dealii_complex_overloads_h
29template <
typename T,
typename U>
34#ifndef DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS
65template <
typename T,
typename U>
66inline std::enable_if_t<
67 std::is_floating_point_v<T> && std::is_floating_point_v<U> &&
68 !std::is_same_v<T, U>,
70operator*(
const std::complex<T> &left,
const std::complex<U> &right)
74 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
106template <
typename T,
typename U>
107inline std::enable_if_t<
108 std::is_floating_point_v<T> && std::is_floating_point_v<U> &&
109 !std::is_same_v<T, U>,
111operator/(
const std::complex<T> &left,
const std::complex<U> &right)
115 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
147template <
typename T,
typename U>
148inline std::enable_if_t<std::is_floating_point_v<T> &&
149 std::is_floating_point_v<U> && !std::is_same_v<T, U>,
154 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
186template <
typename T,
typename U>
187inline std::enable_if_t<std::is_floating_point_v<T> &&
188 std::is_floating_point_v<U> && !std::is_same_v<T, U>,
193 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
225template <
typename T,
typename U>
226inline std::enable_if_t<std::is_floating_point_v<T> &&
227 std::is_floating_point_v<U> && !std::is_same_v<T, U>,
232 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
264template <
typename T,
typename U>
265inline std::enable_if_t<std::is_floating_point_v<T> &&
266 std::is_floating_point_v<U> && !std::is_same_v<T, U>,
271 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
std::enable_if_t< std::is_floating_point_v< T > &&std::is_floating_point_v< U > &&!std::is_same_v< T, 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 > &&!std::is_same_v< T, 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 > &&!std::is_same_v< T, U >, typename ProductType< std::complex< T >, U >::type > operator/(const std::complex< T > &left, const U &right)
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 > &&!std::is_same_v< T, 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 > &&!std::is_same_v< T, 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 > &&!std::is_same_v< T, U >, typename ProductType< T, std::complex< U > >::type > operator/(const T &left, const std::complex< U > &right)