From db079f3a8c07ff733cc440eab15da46c4d16dc98 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 6 May 2009 09:37:30 +0000 Subject: [PATCH] fix internal error with gcc 3.3 (all tests are now ok with 3.3 !) --- 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 ee956bb1f..bdda41a55 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);