From 3ca31a8b74bc21ebc1305160d0b68cbbb6f6eaf1 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Date: Wed, 29 Dec 2010 19:42:01 +0100 Subject: [PATCH] fixed msvc9 build errors. --- Eigen/src/Core/DenseBase.h | 7 ++++--- Eigen/src/Core/MatrixBase.h | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index c5da1c6b0..b335754c0 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -290,14 +290,15 @@ template class DenseBase template struct FixedSegmentReturnType { typedef VectorBlock Type; }; template struct ConstFixedSegmentReturnType { typedef const VectorBlock Type; }; + // Note: The "DenseBase::" prefixes are added to help MSVC9 to match these declarations with the later implementations. SegmentReturnType segment(Index start, Index size); - ConstSegmentReturnType segment(Index start, Index size) const; + typename DenseBase::ConstSegmentReturnType segment(Index start, Index size) const; SegmentReturnType head(Index size); - ConstSegmentReturnType head(Index size) const; + typename DenseBase::ConstSegmentReturnType head(Index size) const; SegmentReturnType tail(Index size); - ConstSegmentReturnType tail(Index size) const; + typename DenseBase::ConstSegmentReturnType tail(Index size) const; template typename FixedSegmentReturnType::Type head(); template typename ConstFixedSegmentReturnType::Type head() const; diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 6fb10de9d..cf8e6841e 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -224,8 +224,9 @@ template class MatrixBase template typename DiagonalIndexReturnType::Type diagonal(); template typename ConstDiagonalIndexReturnType::Type diagonal() const; - typename DiagonalIndexReturnType::Type diagonal(Index index); - typename ConstDiagonalIndexReturnType::Type diagonal(Index index) const; + // Note: The "MatrixBase::" prefixes are added to help MSVC9 to match these declarations with the later implementations. + typename MatrixBase::template DiagonalIndexReturnType::Type diagonal(Index index); + typename MatrixBase::template ConstDiagonalIndexReturnType::Type diagonal(Index index) const; template TriangularView part(); template const TriangularView part() const;