Fixed the signature of numext::abs to make it compatible with complex numbers

This commit is contained in:
Benoit Steiner 2016-04-04 11:09:25 -07:00
parent 2b457f8e5e
commit 1108b4f218

View File

@ -1034,7 +1034,7 @@ double tan(const double &x) { return ::tan(x); }
template<typename T> template<typename T>
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
T abs(const T &x) { typename NumTraits<T>::Real abs(const T &x) {
EIGEN_USING_STD_MATH(abs); EIGEN_USING_STD_MATH(abs);
return abs(x); return abs(x);
} }