From 0d1f7ed252807ba7921b0e2eedcd310412ad7517 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Sun, 2 Oct 2011 22:23:02 +0100 Subject: [PATCH] Workaround for mysterious error C2082 in MSVC. Also, get rid of some "conversion from int to bool" warnings. --- Eigen/src/Core/MatrixBase.h | 3 ++- Eigen/src/Core/SolveTriangular.h | 2 +- Eigen/src/Sparse/TriangularSolver.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index db156f6e9..62877bce0 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -250,7 +250,8 @@ template class MatrixBase // huuuge hack. make Eigen2's matrix.part() work in eigen3. Problem: Diagonal is now a class template instead // of an integer constant. Solution: overload the part() method template wrt template parameters list. - template class U> + // Note: replacing next line by "template class U>" produces a mysterious error C2082 in MSVC. + template class U> const DiagonalWrapper part() const { return diagonal().asDiagonal(); } #endif // EIGEN2_SUPPORT diff --git a/Eigen/src/Core/SolveTriangular.h b/Eigen/src/Core/SolveTriangular.h index 71e129c7f..a23014a34 100644 --- a/Eigen/src/Core/SolveTriangular.h +++ b/Eigen/src/Core/SolveTriangular.h @@ -180,7 +180,7 @@ void TriangularView::solveInPlace(const MatrixBase::Flags & RowMajorBit && OtherDerived::IsVectorAtCompileTime }; typedef typename internal::conditional::solveInPlace(MatrixBase::Flags & RowMajorBit }; @@ -298,7 +298,7 @@ void SparseTriangularView::solveInPlace(SparseMatrixBase::Flags & RowMajorBit };