mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add an assertion when inserting an already existing element
This commit is contained in:
@@ -982,6 +982,7 @@ protected:
|
||||
m_data.value(p) = m_data.value(p-1);
|
||||
--p;
|
||||
}
|
||||
eigen_assert((p<=startId || m_data.index(p-1)!=inner) && "you cannot insert an element that already exist, you must call coeffRef to this end");
|
||||
|
||||
m_innerNonZeros[outer]++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user