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 typename std::enable_if<
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 typename std::enable_if<
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>
77 typename std::enable_if<std::is_floating_point<T>::value &&
78 std::is_floating_point<U>::value,
80 operator*(
const std::complex<T> &left,
const U &right)
83 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
93template <
typename T,
typename U>
95 typename std::enable_if<std::is_floating_point<T>::value &&
96 std::is_floating_point<U>::value,
98 operator/(
const std::complex<T> &left,
const U &right)
101 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
111template <
typename T,
typename U>
114 std::enable_if<std::is_floating_point<T>::value &&
115 std::is_floating_point<U>::value,
120 return static_cast<result_type
>(left) *
static_cast<result_type
>(right);
130template <
typename T,
typename U>
132 typename std::enable_if<std::is_floating_point<T>::value &&
133 std::is_floating_point<U>::value,
138 return static_cast<result_type
>(left) /
static_cast<result_type
>(right);
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
std::enable_if< std::is_floating_point< T >::value &&std::is_floating_point< U >::value, typenameProductType< std::complex< T >, U >::type >::type operator/(const std::complex< T > &left, const U &right)
std::enable_if< std::is_floating_point< T >::value &&std::is_floating_point< U >::value, typenameProductType< T, std::complex< U > >::type >::type operator/(const T &left, const std::complex< U > &right)
std::enable_if< std::is_floating_point< T >::value &&std::is_floating_point< U >::value, typenameProductType< std::complex< T >, std::complex< U > >::type >::type operator*(const std::complex< T > &left, const std::complex< U > &right)
std::enable_if< std::is_floating_point< T >::value &&std::is_floating_point< U >::value, typenameProductType< std::complex< T >, U >::type >::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< std::is_floating_point< T >::value &&std::is_floating_point< U >::value, typenameProductType< T, std::complex< U > >::type >::type operator*(const T &left, const std::complex< U > &right)
std::enable_if< std::is_floating_point< T >::value &&std::is_floating_point< U >::value, typenameProductType< std::complex< T >, std::complex< U > >::type >::type operator/(const std::complex< T > &left, const std::complex< U > &right)