From e47593fb285e92cc30e3aa14d76ef001540f5ce8 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 6 May 2009 09:41:36 +0000 Subject: [PATCH] backporting 964177 (gcc 3.3 fix) --- Eigen/src/Array/PartialRedux.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Array/PartialRedux.h b/Eigen/src/Array/PartialRedux.h index 96c13ca2b..b1e8fd4ba 100644 --- a/Eigen/src/Array/PartialRedux.h +++ b/Eigen/src/Array/PartialRedux.h @@ -61,7 +61,11 @@ struct ei_traits > Flags = (unsigned int)_MatrixTypeNested::Flags & HereditaryBits, TraversalSize = Direction==Vertical ? RowsAtCompileTime : ColsAtCompileTime }; + #if EIGEN_GNUC_AT_LEAST(3,4) typedef typename MemberOp::template Cost CostOpType; + #else + typedef typename MemberOp::template Cost CostOpType; + #endif enum { CoeffReadCost = TraversalSize * ei_traits<_MatrixTypeNested>::CoeffReadCost + int(CostOpType::value) }; @@ -104,7 +108,7 @@ class PartialReduxExpr : ei_no_assignment_operator, { enum { value = COST }; }; \ template \ inline ResultType operator()(const MatrixBase& mat) const \ - { return mat.MEMBER(); } \ + { return mat.MEMBER(); } \ } EIGEN_MEMBER_FUNCTOR(squaredNorm, Size * NumTraits::MulCost + (Size-1)*NumTraits::AddCost);