From 444c09e31359be498e7ba4a1b54c6cc78de7f6f0 Mon Sep 17 00:00:00 2001 From: Desire Nuentsa Date: Thu, 11 Jul 2013 12:36:57 +0200 Subject: [PATCH] Fix constness of diagonal() and transpose() for MSVC. --- Eigen/src/Core/DenseBase.h | 2 +- Eigen/src/Core/MatrixBase.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index 4e8b820bb..9551b8384 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -281,7 +281,7 @@ template class DenseBase CommaInitializer operator<< (const DenseBase& other); Eigen::Transpose transpose(); - typedef const Transpose ConstTransposeReturnType; + typedef typename internal::add_const >::type ConstTransposeReturnType; ConstTransposeReturnType transpose() const; void transposeInPlace(); #ifndef EIGEN_NO_DEBUG diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 373c6821e..9193b6abb 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -215,7 +215,7 @@ template class MatrixBase typedef Diagonal DiagonalReturnType; DiagonalReturnType diagonal(); - typedef const Diagonal ConstDiagonalReturnType; + typedef typename internal::add_const >::type ConstDiagonalReturnType; ConstDiagonalReturnType diagonal() const; template struct DiagonalIndexReturnType { typedef Diagonal Type; };