fix bug #155, const-related compilation error

This commit is contained in:
Benoit Jacob 2011-01-18 09:14:14 -05:00
parent 9b2546fea8
commit 604afc9aca

View File

@ -162,10 +162,10 @@ MatrixBase<Derived>::diagonal()
/** This is the const version of diagonal(). */
template<typename Derived>
inline const typename MatrixBase<Derived>::ConstDiagonalReturnType
inline typename MatrixBase<Derived>::ConstDiagonalReturnType
MatrixBase<Derived>::diagonal() const
{
return derived();
return ConstDiagonalReturnType(derived());
}
/** \returns an expression of the \a DiagIndex-th sub or super diagonal of the matrix \c *this