Fix c++20 warnings about using enums in arithmetic expressions.

(cherry picked from commit f64b2954c7)
This commit is contained in:
Rasmus Munk Larsen
2021-06-10 17:17:39 -07:00
parent 85868564df
commit 4b502a7215
14 changed files with 28 additions and 28 deletions

View File

@@ -124,7 +124,7 @@ void DenseBase<Derived>::visit(Visitor& visitor) const
enum {
unroll = SizeAtCompileTime != Dynamic
&& SizeAtCompileTime * ThisEvaluator::CoeffReadCost + (SizeAtCompileTime-1) * internal::functor_traits<Visitor>::Cost <= EIGEN_UNROLLING_LIMIT
&& SizeAtCompileTime * int(ThisEvaluator::CoeffReadCost) + (SizeAtCompileTime-1) * int(internal::functor_traits<Visitor>::Cost) <= EIGEN_UNROLLING_LIMIT
};
return internal::visitor_impl<Visitor, ThisEvaluator, unroll ? int(SizeAtCompileTime) : Dynamic>::run(thisEval, visitor);
}