From 95e3e4f865c67c0680e92e9dc370cf4a88caa4a9 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 5 Jul 2012 17:22:25 +0200 Subject: [PATCH] Fix bug #480: workaround the Android NDK defining isfinite as a macro (transplanted from 5dbdde0420ef8173656392d5bdbec701b0969361 ) --- Eigen/src/Cholesky/LDLT.h | 2 +- Eigen/src/Core/MathFunctions.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h index a5e3d5469..fb15084c5 100644 --- a/Eigen/src/Cholesky/LDLT.h +++ b/Eigen/src/Cholesky/LDLT.h @@ -370,7 +370,7 @@ template<> struct ldlt_inplace for (Index j = 0; j < size; j++) { // Check for termination due to an original decomposition of low-rank - if (!isfinite(alpha)) + if (!(isfinite)(alpha)) break; // Update the diagonal terms diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index ab153c1eb..f73e09af2 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -845,7 +845,7 @@ template<> struct scalar_fuzzy_impl // std::isfinite is non standard, so let's define our own version, // even though it is not very efficient. -template bool isfinite(const T& x) +template bool (isfinite)(const T& x) { return x::highest() && x>NumTraits::lowest(); }