| commit | 748962722cbf082e5e55daa4c3eca869a7fb976d | [log] [tgz] |
|---|---|---|
| author | Antonio Sánchez <cantonios@google.com> | Wed Nov 05 21:24:44 2025 +0000 |
| committer | Antonio Sánchez <cantonios@google.com> | Wed Nov 05 21:24:44 2025 +0000 |
| tree | fed2624dbae67d75475c7dda15d9e5cdb55b2044 | |
| parent | 284dcc122b776eff0fc1468bcd095112d1d609de [diff] |
Fix SparseVector::insert(Index) assigning int to Scalar
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<ExplicitDouble, int>::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 <calcmogul@gmail.com>Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
For more information go to http://eigen.tuxfamily.org/ or https://libeigen.gitlab.io/docs/.
For pull request, bug reports, and feature requests, go to https://gitlab.com/libeigen/eigen.