From 3a2499fb112a3220d1a4281d3d451581cf0ebc2e Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Tue, 8 Sep 2009 10:02:19 +0200 Subject: [PATCH] Fixed conservative_resize compilation errors. --- Eigen/src/Core/Matrix.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 6eae75dcd..c08f12491 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -25,6 +25,7 @@ #ifndef EIGEN_MATRIX_H #define EIGEN_MATRIX_H +template (Derived::IsVectorAtCompileTime)> struct ei_conservative_resize_like_impl; /** \class Matrix * @@ -701,7 +702,7 @@ class Matrix friend struct ei_matrix_swap_impl; }; -template (Derived::IsVectorAtCompileTime)> +template struct ei_conservative_resize_like_impl { static void run(MatrixBase& _this, const MatrixBase& other) @@ -714,7 +715,7 @@ struct ei_conservative_resize_like_impl EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(Derived) EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(OtherDerived) - MatrixBase::PlainMatrixType tmp(other); + typename MatrixBase::PlainMatrixType tmp(other); const int common_rows = std::min(tmp.rows(), _this.rows()); const int common_cols = std::min(tmp.cols(), _this.cols()); tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols); @@ -728,7 +729,7 @@ struct ei_conservative_resize_like_impl static void run(MatrixBase& _this, const MatrixBase& other) { // segment(...) will check whether Derived/OtherDerived are vectors! - MatrixBase::PlainMatrixType tmp(other); + typename MatrixBase::PlainMatrixType tmp(other); const int common_size = std::min(_this.size(),tmp.size()); tmp.segment(0,common_size) = _this.segment(0,common_size); _this.derived().swap(tmp);