aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-07-20 10:56:03 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-07-20 10:56:03 +0200
commitc10b919edb9a362388a98f620f8cef7292ff496a (patch)
tree65f3e176cf20d05020e9b445c042f42690faad1a /Eigen
parentb3ad796d4087ca768452d1bbe0555a85cd7e1dde (diff)
compilation fix
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/Matrix.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h
index 32b526ef3..f41c9e042 100644
--- a/Eigen/src/Core/Matrix.h
+++ b/Eigen/src/Core/Matrix.h
@@ -536,9 +536,6 @@ class Matrix
resizeLike(other);
}
- template<typename MatrixType, typename OtherDerived, bool EvalBeforeAssigning = (int(OtherDerived::Flags) & EvalBeforeAssigningBit) != 0>
- struct ei_matrix_set_selector;
-
/** \internal Copies the value of the expression \a other into \c *this with automatic resizing.
*
* *this might be resized to match the dimensions of \a other. If *this was a null matrix (not already initialized),
@@ -553,10 +550,16 @@ class Matrix
template<typename OtherDerived>
EIGEN_STRONG_INLINE Matrix& _set(const MatrixBase<OtherDerived>& other)
{
- ei_matrix_set_selector<Matrix,OtherDerived>::run(*this,other.derived());
+ _set_selector(other.derived(), typename ei_meta_if<(int(OtherDerived::Flags) & EvalBeforeAssigningBit), ei_meta_true, ei_meta_false>::ret());
return *this;
}
+ template<typename OtherDerived>
+ EIGEN_STRONG_INLINE void _set_selector(const OtherDerived& other, const ei_meta_true&) { _set_noalias(other.eval()); }
+
+ template<typename OtherDerived>
+ EIGEN_STRONG_INLINE void _set_selector(const OtherDerived& other, const ei_meta_false&) { _set_noalias(other); }
+
/** \internal Like _set() but additionally makes the assumption that no aliasing effect can happen (which
* is the case when creating a new matrix) so one can enforce lazy evaluation.
*
@@ -603,20 +606,6 @@ class Matrix
}
};
-template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
-template<typename MatrixType, typename OtherDerived>
-struct Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::ei_matrix_set_selector<MatrixType,OtherDerived,true>
-{
- static void run(MatrixType& dst, const OtherDerived& src) { dst._set_noalias(src.eval()); }
-};
-
-template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
-template<typename MatrixType, typename OtherDerived>
-struct Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::ei_matrix_set_selector<MatrixType,OtherDerived,false>
-{
- static void run(MatrixType& dst, const OtherDerived& src) { dst._set_noalias(src); }
-};
-
/** \defgroup matrixtypedefs Global matrix typedefs
*
* \ingroup Core_Module