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);