implement scalar operators separately for each type using a macro.

This is required e.g. to allow "2 * m" with m a matrix of doubles.
This commit is contained in:
Benoit Jacob
2007-09-27 07:42:12 +00:00
parent 8a024825d2
commit 628b1a8f6d
9 changed files with 50 additions and 41 deletions

View File

@@ -55,7 +55,7 @@ template<typename MatrixType> class MatrixRow
return EigenBase<Scalar, MatrixRow<MatrixType> >::operator=(other);
}
INHERIT_ASSIGNMENT_OPERATORS(MatrixRow)
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(MatrixRow)
private:
const Ref& _ref() const { return *this; }
@@ -103,7 +103,7 @@ template<typename MatrixType> class MatrixCol
MatrixCol(const MatrixCol& other)
: m_matrix(other.m_matrix), m_col(other.m_col) {}
INHERIT_ASSIGNMENT_OPERATORS(MatrixCol)
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(MatrixCol)
private:
const Ref& _ref() const { return *this; }