diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h index c106f93c4..aab8007b3 100644 --- a/Eigen/src/Core/Diagonal.h +++ b/Eigen/src/Core/Diagonal.h @@ -172,7 +172,7 @@ MatrixBase::diagonal() /** This is the const version of diagonal(). */ template -inline const typename MatrixBase::ConstDiagonalReturnType +inline typename MatrixBase::ConstDiagonalReturnType MatrixBase::diagonal() const { return ConstDiagonalReturnType(derived()); diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 198e51084..373c6821e 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -216,7 +216,7 @@ template class MatrixBase typedef Diagonal DiagonalReturnType; DiagonalReturnType diagonal(); typedef const Diagonal ConstDiagonalReturnType; - const ConstDiagonalReturnType diagonal() const; + ConstDiagonalReturnType diagonal() const; template struct DiagonalIndexReturnType { typedef Diagonal Type; }; template struct ConstDiagonalIndexReturnType { typedef const Diagonal Type; }; diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h index 798120bf4..f21b3aa65 100644 --- a/Eigen/src/Core/Transpose.h +++ b/Eigen/src/Core/Transpose.h @@ -207,7 +207,7 @@ DenseBase::transpose() * * \sa transposeInPlace(), adjoint() */ template -inline const typename DenseBase::ConstTransposeReturnType +inline typename DenseBase::ConstTransposeReturnType DenseBase::transpose() const { return ConstTransposeReturnType(derived());