aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/MathFunctions.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2017-06-27 12:05:17 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2017-06-27 12:05:17 +0200
commit561f77707525644a10cbd971ad14bf47aa0e93e0 (patch)
treee8ac3c2dad981093ab9a29dfbdcf2af61ada3a9c /Eigen/src/Core/MathFunctions.h
parentb651ce0ffa1e5a7f0c6414689d0e1ebb4bd1621c (diff)
Fix a gcc7 warning about bool * bool in abs2 default implementation.
Diffstat (limited to 'Eigen/src/Core/MathFunctions.h')
-rw-r--r--Eigen/src/Core/MathFunctions.h3
1 files changed, 3 insertions, 0 deletions
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<typename Scalar>
EIGEN_DEVICE_FUNC
inline EIGEN_MATHFUNC_RETVAL(norm1, Scalar) norm1(const Scalar& x)