diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index 8bc2f41bd..f7c3bd376 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -211,6 +211,11 @@ public: typedef Block TranslationPart; /** corresponding translation type */ typedef Translation TranslationType; + + // this intermediate enum is needed to avoid an ICE with gcc 3.4 and 4.0 + enum { TransformTimeDiagonalMode = ((Mode==int(Isometry))?Affine:int(Mode)) }; + /** The return type of the product between a diagonal matrix and a transform */ + typedef Transform TransformTimeDiagonalReturnType; protected: @@ -381,10 +386,10 @@ public: * mode is no isometry. In that case, the returned transform is an affinity. */ template - inline const Transform + inline const TransformTimeDiagonalReturnType operator * (const DiagonalBase &b) const { - Transform res(*this); + TransformTimeDiagonalReturnType res(*this); res.linear() *= b; return res; } @@ -396,10 +401,10 @@ public: * mode is no isometry. In that case, the returned transform is an affinity. */ template - friend inline const Transform + friend inline TransformTimeDiagonalReturnType operator * (const DiagonalBase &a, const Transform &b) { - Transform res; + TransformTimeDiagonalReturnType res; res.linear().noalias() = a*b.linear(); res.translation().noalias() = a*b.translation(); if (Mode!=int(AffineCompact))