From c43d254d1376c24c76df45bb274dda74ddfa2e19 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 24 Jan 2017 11:36:43 +0100 Subject: [PATCH] Fix seq().reverse() in c++98 --- Eigen/src/Core/ArithmeticSequence.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/ArithmeticSequence.h b/Eigen/src/Core/ArithmeticSequence.h index c5c8bb105..6c10ecc02 100644 --- a/Eigen/src/Core/ArithmeticSequence.h +++ b/Eigen/src/Core/ArithmeticSequence.h @@ -43,9 +43,20 @@ struct aseq_reverse_first_type { > type; }; +template +struct aseq_reverse_first_type_aux { + typedef Index type; +}; + +template +struct aseq_reverse_first_type_aux::type> { + typedef FixedInt<(SizeType::value-1)*IncrType::value> type; +}; + template struct aseq_reverse_first_type { - typedef Symbolic::AddExpr > type; + typedef typename aseq_reverse_first_type_aux::type Aux; + typedef Symbolic::AddExpr > type; }; template