From 9234883914cc84dd412a3f600d3bfc09e364388c Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Mon, 27 Oct 2025 22:06:59 +0000 Subject: [PATCH] Fix SparseVector::insert(Index) assigning int to Scalar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scalar doesn't necessarily support implicit construction from int or assignment from int. Here's the error message I got without this fix: ``` /home/tav/git/Sleipnir/build/_deps/eigen3-src/Eigen/src/SparseCore/SparseVector.h:180:25: error: no match for ‘operator=’ (operand types are ‘Eigen::internal::CompressedStorage::Scalar’ {aka ‘ExplicitDouble’} and ‘int’) 180 | m_data.value(p + 1) = 0; | ~~~~~~~~~~~~~~~~~~~~^~~ ``` See merge request libeigen/eigen!2046 --- Eigen/src/SparseCore/SparseVector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/SparseCore/SparseVector.h b/Eigen/src/SparseCore/SparseVector.h index 8b34a9ac9..c8d34e318 100644 --- a/Eigen/src/SparseCore/SparseVector.h +++ b/Eigen/src/SparseCore/SparseVector.h @@ -177,7 +177,7 @@ class SparseVector : public SparseCompressedBase