From f88ca0ac79ad67124d1c61d258d243e9f66de22f Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Wed, 26 Jan 2011 09:49:06 -0500 Subject: fix the eigen3 part of bug #159 - build issue with selfadjointview --- Eigen/src/Core/SelfAdjointView.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Eigen/src/Core/SelfAdjointView.h') diff --git a/Eigen/src/Core/SelfAdjointView.h b/Eigen/src/Core/SelfAdjointView.h index 92d58b9f8..0e9872bf5 100644 --- a/Eigen/src/Core/SelfAdjointView.h +++ b/Eigen/src/Core/SelfAdjointView.h @@ -46,14 +46,14 @@ template struct traits > : traits { typedef typename nested::type MatrixTypeNested; - typedef typename remove_reference::type _MatrixTypeNested; + typedef typename remove_all::type MatrixTypeNestedCleaned; typedef MatrixType ExpressionType; typedef typename MatrixType::PlainObject DenseMatrixType; enum { Mode = UpLo | SelfAdjoint, - Flags = _MatrixTypeNested::Flags & (HereditaryBits) + Flags = MatrixTypeNestedCleaned::Flags & (HereditaryBits) & (~(PacketAccessBit | DirectAccessBit | LinearAccessBit)), // FIXME these flags should be preserved - CoeffReadCost = _MatrixTypeNested::CoeffReadCost + CoeffReadCost = MatrixTypeNestedCleaned::CoeffReadCost }; }; } @@ -69,6 +69,8 @@ template class SelfAdjointView public: typedef TriangularBase Base; + typedef typename internal::traits::MatrixTypeNested MatrixTypeNested; + typedef typename internal::traits::MatrixTypeNestedCleaned MatrixTypeNestedCleaned; /** \brief The type of coefficients in this matrix */ typedef typename internal::traits::Scalar Scalar; @@ -107,10 +109,10 @@ template class SelfAdjointView } /** \internal */ - const MatrixType& _expression() const { return m_matrix; } + const MatrixTypeNestedCleaned& _expression() const { return m_matrix; } - const MatrixType& nestedExpression() const { return m_matrix; } - MatrixType& nestedExpression() { return const_cast(m_matrix); } + const MatrixTypeNestedCleaned& nestedExpression() const { return m_matrix; } + MatrixTypeNestedCleaned& nestedExpression() { return *const_cast(&m_matrix); } /** Efficient self-adjoint matrix times vector/matrix product */ template @@ -197,7 +199,7 @@ template class SelfAdjointView #endif protected: - const typename MatrixType::Nested m_matrix; + const MatrixTypeNested m_matrix; }; -- cgit v1.2.3