aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2009-09-08 10:02:19 +0200
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2009-09-08 10:02:19 +0200
commit3a2499fb112a3220d1a4281d3d451581cf0ebc2e (patch)
treee629b13feb30657592494522fd558730869f8013 /Eigen
parente6cac85333c9d03421ded5ea356f806521ae58c4 (diff)
Fixed conservative_resize compilation errors.
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/Matrix.h7
1 files 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 <typename Derived, typename OtherDerived, bool IsVector = static_cast<bool>(Derived::IsVectorAtCompileTime)> struct ei_conservative_resize_like_impl;
/** \class Matrix
*
@@ -701,7 +702,7 @@ class Matrix
friend struct ei_matrix_swap_impl;
};
-template <typename Derived, typename OtherDerived, bool IsVector = static_cast<bool>(Derived::IsVectorAtCompileTime)>
+template <typename Derived, typename OtherDerived, bool IsVector>
struct ei_conservative_resize_like_impl
{
static void run(MatrixBase<Derived>& _this, const MatrixBase<OtherDerived>& other)
@@ -714,7 +715,7 @@ struct ei_conservative_resize_like_impl
EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(Derived)
EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(OtherDerived)
- MatrixBase<Derived>::PlainMatrixType tmp(other);
+ typename MatrixBase<Derived>::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<Derived,OtherDerived,true>
static void run(MatrixBase<Derived>& _this, const MatrixBase<OtherDerived>& other)
{
// segment(...) will check whether Derived/OtherDerived are vectors!
- MatrixBase<Derived>::PlainMatrixType tmp(other);
+ typename MatrixBase<Derived>::PlainMatrixType tmp(other);
const int common_size = std::min<int>(_this.size(),tmp.size());
tmp.segment(0,common_size) = _this.segment(0,common_size);
_this.derived().swap(tmp);