diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-08-02 02:47:30 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-08-02 02:47:30 +0200 |
commit | 3e59163a24c5ff1a8009887cb5d5e091ae6df540 (patch) | |
tree | b1a88cfcc895245a35f4493c9cf4baa563bc020d /Eigen/src/Core/PlainObjectBase.h | |
parent | c53f88297c8dc0a1622258df701bdc864ff9ee76 (diff) |
Fix bug #850: workaround MSVC 2008 weird compilation bug
Diffstat (limited to 'Eigen/src/Core/PlainObjectBase.h')
-rw-r--r-- | Eigen/src/Core/PlainObjectBase.h | 4 |
1 files changed, 3 insertions, 1 deletions
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<Derived>::type EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(Index size, typename internal::enable_if<Base::SizeAtCompileTime!=1 || !internal::is_convertible<T, Scalar>::value,T>::type* = 0) { - EIGEN_STATIC_ASSERT(bool(NumTraits<T>::IsInteger), + // NOTE MSVC 2008 complains if we directly put bool(NumTraits<T>::IsInteger) as the EIGEN_STATIC_ASSERT argument. + const bool is_integer = NumTraits<T>::IsInteger; + EIGEN_STATIC_ASSERT(is_integer, FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED) resize(size); } |