Introduce a compilation error when using the wrong InnerIterator type.

This commit is contained in:
Gael Guennebaud 2014-09-19 09:58:20 +02:00
parent e70506dd8f
commit 07c5500d70

View File

@ -887,6 +887,11 @@ class SparseMatrix<Scalar,_Options,_Index>::InnerIterator
const Index m_outer;
Index m_id;
Index m_end;
private:
// If you get here, then you're not using the right InnerIterator type, e.g.:
// SparseMatrix<double,RowMajor> A;
// SparseMatrix<double>::InnerIterator it(A,0);
template<typename T> InnerIterator(const SparseMatrixBase<T>&,Index outer);
};
template<typename Scalar, int _Options, typename _Index>