mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix VC10 ICE
This commit is contained in:
@@ -39,17 +39,21 @@ template<typename MatrixType> class TransposeImpl<MatrixType,Sparse>
|
||||
inline Index nonZeros() const { return derived().nestedExpression().nonZeros(); }
|
||||
};
|
||||
|
||||
// NOTE: VC10 trigger an ICE if don't put typename TransposeImpl<MatrixType,Sparse>:: in front of Index,
|
||||
// a typedef typename TransposeImpl<MatrixType,Sparse>::Index Index;
|
||||
// does not fix the issue.
|
||||
// An alternative is to define the nested class in the parent class itself.
|
||||
template<typename MatrixType> class TransposeImpl<MatrixType,Sparse>::InnerIterator
|
||||
: public _MatrixTypeNested::InnerIterator
|
||||
{
|
||||
typedef typename _MatrixTypeNested::InnerIterator Base;
|
||||
public:
|
||||
|
||||
EIGEN_STRONG_INLINE InnerIterator(const TransposeImpl& trans, Index outer)
|
||||
EIGEN_STRONG_INLINE InnerIterator(const TransposeImpl& trans, typename TransposeImpl<MatrixType,Sparse>::Index outer)
|
||||
: Base(trans.derived().nestedExpression(), outer)
|
||||
{}
|
||||
inline Index row() const { return Base::col(); }
|
||||
inline Index col() const { return Base::row(); }
|
||||
inline typename TransposeImpl<MatrixType,Sparse>::Index row() const { return Base::col(); }
|
||||
inline typename TransposeImpl<MatrixType,Sparse>::Index col() const { return Base::row(); }
|
||||
};
|
||||
|
||||
template<typename MatrixType> class TransposeImpl<MatrixType,Sparse>::ReverseInnerIterator
|
||||
@@ -58,11 +62,11 @@ template<typename MatrixType> class TransposeImpl<MatrixType,Sparse>::ReverseInn
|
||||
typedef typename _MatrixTypeNested::ReverseInnerIterator Base;
|
||||
public:
|
||||
|
||||
EIGEN_STRONG_INLINE ReverseInnerIterator(const TransposeImpl& xpr, Index outer)
|
||||
EIGEN_STRONG_INLINE ReverseInnerIterator(const TransposeImpl& xpr, typename TransposeImpl<MatrixType,Sparse>::Index outer)
|
||||
: Base(xpr.derived().nestedExpression(), outer)
|
||||
{}
|
||||
inline Index row() const { return Base::col(); }
|
||||
inline Index col() const { return Base::row(); }
|
||||
inline typename TransposeImpl<MatrixType,Sparse>::Index row() const { return Base::col(); }
|
||||
inline typename TransposeImpl<MatrixType,Sparse>::Index col() const { return Base::row(); }
|
||||
};
|
||||
|
||||
#endif // EIGEN_SPARSETRANSPOSE_H
|
||||
|
||||
Reference in New Issue
Block a user