diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-06-10 15:58:04 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-06-10 15:58:04 +0200 |
commit | 5fdd7036293aef88e5bdfe30acc74206486d82af (patch) | |
tree | b309049aabdb3383037707bee6f538b02a25665f /Eigen/src/Core/functors/BinaryFunctors.h | |
parent | 2e238bafb69ab0ee2ab2e682d5ac1a43376f9496 (diff) |
Enable mixing types in numext::pow
Diffstat (limited to 'Eigen/src/Core/functors/BinaryFunctors.h')
-rw-r--r-- | Eigen/src/Core/functors/BinaryFunctors.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Eigen/src/Core/functors/BinaryFunctors.h b/Eigen/src/Core/functors/BinaryFunctors.h index c59147db4..ec06499a0 100644 --- a/Eigen/src/Core/functors/BinaryFunctors.h +++ b/Eigen/src/Core/functors/BinaryFunctors.h @@ -251,9 +251,10 @@ struct functor_traits<scalar_hypot_op<Scalar,Scalar> > { * \brief Template functor to compute the pow of two scalars */ template<typename Scalar, typename OtherScalar> struct scalar_binary_pow_op { + typedef typename ScalarBinaryOpTraits<Scalar,OtherScalar,scalar_binary_pow_op>::ReturnType result_type; EIGEN_EMPTY_STRUCT_CTOR(scalar_binary_pow_op) EIGEN_DEVICE_FUNC - inline Scalar operator() (const Scalar& a, const OtherScalar& b) const { return numext::pow(a, b); } + inline result_type operator() (const Scalar& a, const OtherScalar& b) const { return numext::pow(a, b); } }; template<typename Scalar, typename OtherScalar> struct functor_traits<scalar_binary_pow_op<Scalar,OtherScalar> > { |