From 973e6a035f0207e47bf8face584f002ff169ced1 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 20 Oct 2014 14:07:08 +0200 Subject: [PATCH] bug #718: Introduce a compilation error when using the wrong InnerIterator type with a SparseVector --- Eigen/src/SparseCore/SparseVector.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Eigen/src/SparseCore/SparseVector.h b/Eigen/src/SparseCore/SparseVector.h index dfbb2be2e..8b696a476 100644 --- a/Eigen/src/SparseCore/SparseVector.h +++ b/Eigen/src/SparseCore/SparseVector.h @@ -386,6 +386,11 @@ class SparseVector::InnerIterator const internal::CompressedStorage& 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 A; + // SparseMatrix::InnerIterator it(A,0); + template InnerIterator(const SparseMatrixBase&,Index outer=0); }; template