Workaround for mysterious error C2082 in MSVC.

Also, get rid of some "conversion from int to bool" warnings.
This commit is contained in:
Jitse Niesen 2011-10-02 22:23:02 +01:00
parent bef5ada15a
commit 0d1f7ed252
3 changed files with 5 additions and 4 deletions

View File

@ -250,7 +250,8 @@ template<typename Derived> class MatrixBase
// huuuge hack. make Eigen2's matrix.part<Diagonal>() 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<template<typename T, int n> class U>
// Note: replacing next line by "template<template<typename T, int n> class U>" produces a mysterious error C2082 in MSVC.
template<template<typename, int> class U>
const DiagonalWrapper<ConstDiagonalReturnType> part() const
{ return diagonal().asDiagonal(); }
#endif // EIGEN2_SUPPORT

View File

@ -180,7 +180,7 @@ void TriangularView<MatrixType,Mode>::solveInPlace(const MatrixBase<OtherDerived
eigen_assert(cols() == rows());
eigen_assert( (Side==OnTheLeft && cols() == other.rows()) || (Side==OnTheRight && cols() == other.cols()) );
eigen_assert(!(Mode & ZeroDiag));
eigen_assert(Mode & (Upper|Lower));
eigen_assert((Mode & (Upper|Lower)) != 0);
enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit && OtherDerived::IsVectorAtCompileTime };
typedef typename internal::conditional<copy,

View File

@ -171,7 +171,7 @@ void SparseTriangularView<ExpressionType,Mode>::solveInPlace(MatrixBase<OtherDer
eigen_assert(m_matrix.cols() == m_matrix.rows());
eigen_assert(m_matrix.cols() == other.rows());
eigen_assert(!(Mode & ZeroDiag));
eigen_assert(Mode & (Upper|Lower));
eigen_assert((Mode & (Upper|Lower)) != 0);
enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };
@ -298,7 +298,7 @@ void SparseTriangularView<ExpressionType,Mode>::solveInPlace(SparseMatrixBase<Ot
eigen_assert(m_matrix.cols() == m_matrix.rows());
eigen_assert(m_matrix.cols() == other.rows());
eigen_assert(!(Mode & ZeroDiag));
eigen_assert(Mode & (Upper|Lower));
eigen_assert((Mode & (Upper|Lower)) != 0);
// enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };