bug #718: Introduce a compilation error when using the wrong InnerIterator type with a SparseVector

This commit is contained in:
Gael Guennebaud 2014-10-20 14:07:08 +02:00
parent 84aaa03182
commit 973e6a035f

View File

@ -386,6 +386,11 @@ class SparseVector<Scalar,_Options,_Index>::InnerIterator
const internal::CompressedStorage<Scalar,Index>& m_data;
Index m_id;
const 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=0);
};
template<typename Scalar, int _Options, typename _Index>