fix #138: const bool is (rightly) not considered a compile-time constant by ICC, use enum.

This commit is contained in:
Benoit Jacob 2010-06-16 07:32:44 -04:00
parent 8438719111
commit 404aa963d9

View File

@ -86,11 +86,11 @@ template<typename Derived>
template<typename Visitor>
void DenseBase<Derived>::visit(Visitor& visitor) const
{
const bool unroll = SizeAtCompileTime != Dynamic
enum { unroll = SizeAtCompileTime != Dynamic
&& CoeffReadCost != Dynamic
&& (SizeAtCompileTime == 1 || ei_functor_traits<Visitor>::Cost != Dynamic)
&& SizeAtCompileTime * CoeffReadCost + (SizeAtCompileTime-1) * ei_functor_traits<Visitor>::Cost
<= EIGEN_UNROLLING_LIMIT;
<= EIGEN_UNROLLING_LIMIT };
return ei_visitor_impl<Visitor, Derived,
unroll ? int(SizeAtCompileTime) : Dynamic
>::run(derived(), visitor);