diff --git a/src/fintamath/expressions/Expression.cpp b/src/fintamath/expressions/Expression.cpp index 419dc1454..c20c83211 100644 --- a/src/fintamath/expressions/Expression.cpp +++ b/src/fintamath/expressions/Expression.cpp @@ -347,8 +347,7 @@ void Expression::fixOperatorTypes(TermVector &terms) { } } - // TODO: use reverse(iota(1, terms.size() - 1)) when it is work - for (size_t i = terms.size() - 2; i > 0; i--) { + for (auto i : std::views::reverse(std::views::iota(1U, terms.size()))) { const auto &term = terms[i]; const auto &termNext = terms[i + 1];