aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Geometry/Transform.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2012-06-08 14:13:28 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2012-06-08 14:13:28 +0200
commit28d0a8580e74cac5319e42afb4bf929e47f1c9e9 (patch)
treeb89f606c914771fde908638f643acf4db6550218 /Eigen/src/Geometry/Transform.h
parent7e36d32b32921875ab452e712ca8e101b805afb6 (diff)
workaround ICC 11.1 compilation issue
Diffstat (limited to 'Eigen/src/Geometry/Transform.h')
-rw-r--r--Eigen/src/Geometry/Transform.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h
index be588fe41..4bd6859b7 100644
--- a/Eigen/src/Geometry/Transform.h
+++ b/Eigen/src/Geometry/Transform.h
@@ -468,15 +468,40 @@ public:
{
return internal::transform_transform_product_impl<Transform,Transform>::run(*this,other);
}
-
+
+ #ifdef __INTEL_COMPILER
+private:
+ // this intermediate structure permits to workaround a bug in ICC 11:
+ // error: template instantiation resulted in unexpected function type of "Eigen::Transform<double, 3, 32, 0>
+ // (const Eigen::Transform<double, 3, 2, 0> &) const"
+ // (the meaning of a name may have changed since the template declaration -- the type of the template is:
+ // "Eigen::internal::transform_transform_product_impl<Eigen::Transform<double, 3, 32, 0>,
+ // Eigen::Transform<double, 3, Mode, Options>, <expression>>::ResultType (const Eigen::Transform<double, 3, Mode, Options> &) const")
+ //
+ template<int OtherMode,int OtherOptions> struct icc_11_workaround
+ {
+ typedef internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> > ProductType;
+ typedef typename ProductType::ResultType ResultType;
+ };
+
+public:
/** Concatenates two different transformations */
template<int OtherMode,int OtherOptions>
- inline const typename internal::transform_transform_product_impl<
- Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::ResultType
+ inline typename icc_11_workaround<OtherMode,OtherOptions>::ResultType
+ operator * (const Transform<Scalar,Dim,OtherMode,OtherOptions>& other) const
+ {
+ typedef typename icc_11_workaround<OtherMode,OtherOptions>::ProductType ProductType;
+ return ProductType::run(*this,other);
+ }
+ #else
+ /** Concatenates two different transformations */
+ template<int OtherMode,int OtherOptions>
+ inline typename internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::ResultType
operator * (const Transform<Scalar,Dim,OtherMode,OtherOptions>& other) const
{
return internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::run(*this,other);
}
+ #endif
/** \sa MatrixBase::setIdentity() */
void setIdentity() { m_matrix.setIdentity(); }