From 404aa963d980fcaea8daed899830378b9a6da506 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Wed, 16 Jun 2010 07:32:44 -0400 Subject: [PATCH] fix #138: const bool is (rightly) not considered a compile-time constant by ICC, use enum. --- Eigen/src/Core/Visitor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/Visitor.h b/Eigen/src/Core/Visitor.h index 9116b9512..d6efb0495 100644 --- a/Eigen/src/Core/Visitor.h +++ b/Eigen/src/Core/Visitor.h @@ -86,11 +86,11 @@ template template void DenseBase::visit(Visitor& visitor) const { - const bool unroll = SizeAtCompileTime != Dynamic + enum { unroll = SizeAtCompileTime != Dynamic && CoeffReadCost != Dynamic && (SizeAtCompileTime == 1 || ei_functor_traits::Cost != Dynamic) && SizeAtCompileTime * CoeffReadCost + (SizeAtCompileTime-1) * ei_functor_traits::Cost - <= EIGEN_UNROLLING_LIMIT; + <= EIGEN_UNROLLING_LIMIT }; return ei_visitor_impl::run(derived(), visitor);