From 561f77707525644a10cbd971ad14bf47aa0e93e0 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. --- 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 0be4a25da..f5635c076 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -1059,6 +1059,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)