mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
make shameless use of const_cast to reduce code redundancy. This means Eigen2
gives up enforcing constness. I really tried to enforce it, but it really was much hassle because our expression templates can be lvalues (not only rvalues) and so much code had to be written twice.
This commit is contained in:
@@ -45,8 +45,7 @@ template<typename MatrixType> class Transpose
|
||||
EI_INHERIT_ASSIGNMENT_OPERATORS(Transpose)
|
||||
|
||||
private:
|
||||
Transpose& _ref() { return *this; }
|
||||
const Transpose& _constRef() const { return *this; }
|
||||
const Transpose& _ref() const { return *this; }
|
||||
int _rows() const { return m_matrix.cols(); }
|
||||
int _cols() const { return m_matrix.rows(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user