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