From 3e59163a24c5ff1a8009887cb5d5e091ae6df540 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sat, 2 Aug 2014 02:47:30 +0200 Subject: [PATCH] Fix bug #850: workaround MSVC 2008 weird compilation bug --- Eigen/src/Core/PlainObjectBase.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index f8292c793..69f34bd3e 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -708,7 +708,9 @@ class PlainObjectBase : public internal::dense_xpr_base::type EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(Index size, typename internal::enable_if::value,T>::type* = 0) { - EIGEN_STATIC_ASSERT(bool(NumTraits::IsInteger), + // NOTE MSVC 2008 complains if we directly put bool(NumTraits::IsInteger) as the EIGEN_STATIC_ASSERT argument. + const bool is_integer = NumTraits::IsInteger; + EIGEN_STATIC_ASSERT(is_integer, FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED) resize(size); }