Fix a gcc7 warning about bool * bool in abs2 default implementation.

This commit is contained in:
Gael Guennebaud 2017-06-27 12:05:17 +02:00
parent b651ce0ffa
commit 561f777075

View File

@ -1059,6 +1059,9 @@ inline EIGEN_MATHFUNC_RETVAL(abs2, Scalar) abs2(const Scalar& x)
return EIGEN_MATHFUNC_IMPL(abs2, Scalar)::run(x); return EIGEN_MATHFUNC_IMPL(abs2, Scalar)::run(x);
} }
EIGEN_DEVICE_FUNC
inline bool abs2(bool x) { return x; }
template<typename Scalar> template<typename Scalar>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC
inline EIGEN_MATHFUNC_RETVAL(norm1, Scalar) norm1(const Scalar& x) inline EIGEN_MATHFUNC_RETVAL(norm1, Scalar) norm1(const Scalar& x)