diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-08-25 13:09:56 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-08-25 13:09:56 +0200 |
commit | cb7a72d5b0e2b83b14bc54be62603267f8a2d4f5 (patch) | |
tree | 30cdb81cf7292f679b19c549c52c5e2976d55248 /Eigen/src/Core/Product.h | |
parent | e17d17cea3ab1e01a7fa754b9c8d9c857f5c7a50 (diff) |
Fix Sun CC parsing of Eigen/Core. In particular,
I moved all the block related methods to a plugin file. This also
significantly reduce code verbosity.
Diffstat (limited to 'Eigen/src/Core/Product.h')
-rw-r--r-- | Eigen/src/Core/Product.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 25b48517d..8e82338e7 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -163,6 +163,10 @@ struct ProductReturnType<Lhs,Rhs,LazyCoeffBasedProductMode> typedef CoeffBasedProduct<LhsNested, RhsNested, NestByRefBit> Type; }; +// this is a workaround for sun CC +template<typename Lhs, typename Rhs> +struct LazyProductReturnType : public ProductReturnType<Lhs,Rhs,LazyCoeffBasedProductMode> +{}; /*********************************************************************** * Implementation of Inner Vector Vector Product @@ -514,7 +518,7 @@ MatrixBase<Derived>::operator*(const MatrixBase<OtherDerived> &other) const */ template<typename Derived> template<typename OtherDerived> -const typename ProductReturnType<Derived,OtherDerived,LazyCoeffBasedProductMode>::Type +const typename LazyProductReturnType<Derived,OtherDerived>::Type MatrixBase<Derived>::lazyProduct(const MatrixBase<OtherDerived> &other) const { enum { @@ -533,7 +537,7 @@ MatrixBase<Derived>::lazyProduct(const MatrixBase<OtherDerived> &other) const INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION) EIGEN_STATIC_ASSERT(ProductIsValid || SameSizes, INVALID_MATRIX_PRODUCT) - return typename ProductReturnType<Derived,OtherDerived,LazyCoeffBasedProductMode>::Type(derived(), other.derived()); + return typename LazyProductReturnType<Derived,OtherDerived>::Type(derived(), other.derived()); } #endif // EIGEN_PRODUCT_H |