Fix g++-6 constexpr and c++20 constexpr build errors.

This commit is contained in:
Antonio Sánchez
2022-09-09 03:41:45 +00:00
committed by Rasmus Munk Larsen
parent ec9c7163a3
commit fb212c745d
4 changed files with 26 additions and 31 deletions

View File

@@ -200,8 +200,7 @@ struct redux_impl<Func, Evaluator, DefaultTraversal, NoUnrolling>
Scalar run(const Evaluator &eval, const Func& func, const XprType& xpr)
{
eigen_assert(xpr.rows()>0 && xpr.cols()>0 && "you are using an empty matrix");
Scalar res;
res = eval.coeffByOuterInner(0, 0);
Scalar res = eval.coeffByOuterInner(0, 0);
for(Index i = 1; i < xpr.innerSize(); ++i)
res = func(res, eval.coeffByOuterInner(0, i));
for(Index i = 1; i < xpr.outerSize(); ++i)