diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-02-02 17:47:48 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-02-02 17:47:48 +0100 |
commit | a617d7f2adaa97fc0435ccae7954bcd9840b8857 (patch) | |
tree | be75fbb56e69db9c8a8525eba61992f444d895c2 /Eigen | |
parent | 52e0a4403406ce8cd038efe13754d3ac24faac6d (diff) |
fix compilation with MSVC2005 (strange, stupid fixes for MSVC9 confuse MSVC8....)
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/MatrixBase.h | 8 |
1 files changed, 7 insertions, 1 deletions
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<typename Derived> class MatrixBase typedef Diagonal<Derived> DiagonalReturnType; DiagonalReturnType diagonal(); typedef const Diagonal<const Derived> ConstDiagonalReturnType; - ConstDiagonalReturnType diagonal() const; + const ConstDiagonalReturnType diagonal() const; template<int Index> struct DiagonalIndexReturnType { typedef Diagonal<Derived,Index> Type; }; template<int Index> struct ConstDiagonalIndexReturnType { typedef const Diagonal<const Derived,Index> Type; }; @@ -232,8 +232,14 @@ template<typename Derived> class MatrixBase template<int Index> typename ConstDiagonalIndexReturnType<Index>::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<Dynamic>::Type diagonal(Index index); typename MatrixBase::template ConstDiagonalIndexReturnType<Dynamic>::Type diagonal(Index index) const; + #else + typename DiagonalIndexReturnType<Dynamic>::Type diagonal(Index index); + typename ConstDiagonalIndexReturnType<Dynamic>::Type diagonal(Index index) const; + #endif #ifdef EIGEN2_SUPPORT template<unsigned int Mode> typename internal::eigen2_part_return_type<Derived, Mode>::type part(); |