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);