From 7027b5a8f945777cea3dbf7e3b93869f7b215415 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 2 Jul 2012 10:20:44 +0200 Subject: [PATCH] workaround compilation issue with MSVC 2005 (transplanted from eee34f2da4039adaba5016e1498c3700e6e3e927 ) --- Eigen/src/SparseCore/SparseMatrix.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index 214f130f5..ee2347f7b 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -282,7 +282,11 @@ class SparseMatrix reserveInnerVectors(reserveSizes); } template - inline void reserve(const SizesType& reserveSizes, const typename SizesType::Scalar& enableif = typename SizesType::Scalar()) + inline void reserve(const SizesType& reserveSizes, const typename SizesType::Scalar& enableif = + #if (!defined(_MSC_VER)) || (_MSC_VER>=1500) // MSVC 2005 fails to compile with this typename + typename + #endif + SizesType::Scalar()) { EIGEN_UNUSED_VARIABLE(enableif); reserveInnerVectors(reserveSizes);