13#ifndef dealii_complex_overloads_h
14#define dealii_complex_overloads_h
27template <
typename T,
typename U>
32#ifndef DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS
63template <
typename T,
typename U>
64inline std::enable_if_t<
65 std::is_floating_point_v<T> && std::is_floating_point_v<U> &&
66 !std::is_same_v<T, U>,
68operator*(
const std::complex<T> &left,
const std::complex<U> &right)
72 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
104template <
typename T,
typename U>
105inline std::enable_if_t<
106 std::is_floating_point_v<T> && std::is_floating_point_v<U> &&
107 !std::is_same_v<T, U>,
109operator/(
const std::complex<T> &left,
const std::complex<U> &right)
113 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
145template <
typename T,
typename U>
146inline std::enable_if_t<std::is_floating_point_v<T> &&
147 std::is_floating_point_v<U> && !std::is_same_v<T, U>,
152 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
184template <
typename T,
typename U>
185inline std::enable_if_t<std::is_floating_point_v<T> &&
186 std::is_floating_point_v<U> && !std::is_same_v<T, U>,
191 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
223template <
typename T,
typename U>
224inline std::enable_if_t<std::is_floating_point_v<T> &&
225 std::is_floating_point_v<U> && !std::is_same_v<T, U>,
230 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
262template <
typename T,
typename U>
263inline std::enable_if_t<std::is_floating_point_v<T> &&
264 std::is_floating_point_v<U> && !std::is_same_v<T, U>,
269 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)