diff options
Diffstat (limited to 'extern/Eigen3/Eigen/src/Core/Replicate.h')
-rw-r--r-- | extern/Eigen3/Eigen/src/Core/Replicate.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/extern/Eigen3/Eigen/src/Core/Replicate.h b/extern/Eigen3/Eigen/src/Core/Replicate.h index d2f9712db0f..4c171f8d580 100644 --- a/extern/Eigen3/Eigen/src/Core/Replicate.h +++ b/extern/Eigen3/Eigen/src/Core/Replicate.h @@ -48,7 +48,10 @@ struct traits<Replicate<MatrixType,RowFactor,ColFactor> > typedef typename MatrixType::Scalar Scalar; typedef typename traits<MatrixType>::StorageKind StorageKind; typedef typename traits<MatrixType>::XprKind XprKind; - typedef typename nested<MatrixType>::type MatrixTypeNested; + enum { + Factor = (RowFactor==Dynamic || ColFactor==Dynamic) ? Dynamic : RowFactor*ColFactor + }; + typedef typename nested<MatrixType,Factor>::type MatrixTypeNested; typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested; enum { RowsAtCompileTime = RowFactor==Dynamic || int(MatrixType::RowsAtCompileTime)==Dynamic @@ -72,6 +75,8 @@ struct traits<Replicate<MatrixType,RowFactor,ColFactor> > template<typename MatrixType,int RowFactor,int ColFactor> class Replicate : public internal::dense_xpr_base< Replicate<MatrixType,RowFactor,ColFactor> >::type { + typedef typename internal::traits<Replicate>::MatrixTypeNested MatrixTypeNested; + typedef typename internal::traits<Replicate>::_MatrixTypeNested _MatrixTypeNested; public: typedef typename internal::dense_xpr_base<Replicate>::type Base; @@ -124,7 +129,7 @@ template<typename MatrixType,int RowFactor,int ColFactor> class Replicate protected: - const typename MatrixType::Nested m_matrix; + const MatrixTypeNested m_matrix; const internal::variable_if_dynamic<Index, RowFactor> m_rowFactor; const internal::variable_if_dynamic<Index, ColFactor> m_colFactor; }; |