From 6c4d57dc9e0d0c37a14a1f0ec44da4d101348427 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 27 Jun 2017 12:05:17 +0200 Subject: [PATCH] Fix a gcc7 warning about bool * bool in abs2 default implementation. (grafted from 561f77707525644a10cbd971ad14bf47aa0e93e0 ) --- Eigen/src/Core/MathFunctions.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index b249ce0c8..ee1b2ece3 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -916,6 +916,9 @@ inline EIGEN_MATHFUNC_RETVAL(abs2, Scalar) abs2(const Scalar& x) return EIGEN_MATHFUNC_IMPL(abs2, Scalar)::run(x); } +EIGEN_DEVICE_FUNC +inline bool abs2(bool x) { return x; } + template EIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(norm1, Scalar) norm1(const Scalar& x)