From 748962722cbf082e5e55daa4c3eca869a7fb976d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Wed, 5 Nov 2025 21:24:44 +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 (cherry picked from commit 9234883914cc84dd412a3f600d3bfc09e364388c) 48d2b101 Fix SparseVector::insert(Index) assigning int to Scalar Co-authored-by: Tyler Veness --- 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