Skip to content

Commit

Permalink
Eigen: fix overloaded call to make_tuple is ambiguous
Browse files Browse the repository at this point in the history
  • Loading branch information
hmenke committed Feb 1, 2024
1 parent 4e3a86e commit 5d77ce6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/nanobind/eigen/sparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ template <typename T> struct type_caster<T, enable_if_t<is_eigen_sparse_matrix_v
StorageIndexNDArray inner_indices(src->innerIndexPtr(), 1, data_shape, owner);

try {
return matrix_type(make_tuple(
return matrix_type(nanobind::make_tuple(
std::move(data), std::move(inner_indices), std::move(outer_indices)),
make_tuple(rows, cols))
nanobind::make_tuple(rows, cols))
.release();
} catch (python_error &e) {
e.restore();
Expand Down
2 changes: 2 additions & 0 deletions tests/test_eigen.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <nanobind/stl/complex.h>
#include <nanobind/eigen/dense.h>
#include <nanobind/eigen/sparse.h>
#include <nanobind/trampoline.h>
Expand Down Expand Up @@ -165,6 +166,7 @@ NB_MODULE(test_eigen_ext, m) {
assert(!m.isCompressed());
return m.markAsRValue();
});
m.def("sparse_complex", []() -> Eigen::SparseMatrix<std::complex<double>> { return {}; });

/// issue #166
using Matrix1d = Eigen::Matrix<double,1,1>;
Expand Down

0 comments on commit 5d77ce6

Please sign in to comment.