From a617d7f2adaa97fc0435ccae7954bcd9840b8857 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 2 Feb 2011 17:47:48 +0100 Subject: fix compilation with MSVC2005 (strange, stupid fixes for MSVC9 confuse MSVC8....) --- Eigen/src/Core/MatrixBase.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Eigen/src') diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 99ddf1077..c62311469 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -223,7 +223,7 @@ template class MatrixBase typedef Diagonal DiagonalReturnType; DiagonalReturnType diagonal(); typedef const Diagonal ConstDiagonalReturnType; - ConstDiagonalReturnType diagonal() const; + const ConstDiagonalReturnType diagonal() const; template struct DiagonalIndexReturnType { typedef Diagonal Type; }; template struct ConstDiagonalIndexReturnType { typedef const Diagonal Type; }; @@ -232,8 +232,14 @@ template class MatrixBase template typename ConstDiagonalIndexReturnType::Type diagonal() const; // Note: The "MatrixBase::" prefixes are added to help MSVC9 to match these declarations with the later implementations. + // On the other hand they confuse MSVC8... + #if (defined _MSC_VER) && (_MSC_VER >= 1500) // 2008 or later typename MatrixBase::template DiagonalIndexReturnType::Type diagonal(Index index); typename MatrixBase::template ConstDiagonalIndexReturnType::Type diagonal(Index index) const; + #else + typename DiagonalIndexReturnType::Type diagonal(Index index); + typename ConstDiagonalIndexReturnType::Type diagonal(Index index) const; + #endif #ifdef EIGEN2_SUPPORT template typename internal::eigen2_part_return_type::type part(); -- cgit v1.2.3