}
In file included from ../include/Eigen/Eigen/SparseCore:40:0,
from ../include/Eigen/Eigen/Sparse:19,
from cppad_eigen_sparse_test.cpp:6:
../include/Eigen/Eigen/src/SparseCore/SparseMatrix.h: In member function ‘Eigen::SparseMatrix<_Scalar, _Flags, _Index>::Scalar& Eigen::SparseMatrix<_Scalar, _Flags, _Index>::insert(Eigen::SparseMatrix<_Scalar, _Flags, _Index>::Index, Eigen::SparseMatrix<_Scalar, _Flags, _Index>::Index) [with _Scalar = double, int _Options = 0, _Index = int, Eigen::SparseMatrix<_Scalar, _Flags, _Index>::Scalar = double, Eigen::SparseMatrix<_Scalar, _Flags, _Index>::Index = int]’:
../include/Eigen/Eigen/src/SparseCore/SparseMatrix.h:200:30: instantiated from ‘Eigen::SparseMatrix<_Scalar, _Flags, _Index>::Scalar& Eigen::SparseMatrix<_Scalar, _Flags, _Index>::coeffRef(Eigen::SparseMatrix<_Scalar, _Flags, _Index>::Index, Eigen::SparseMatrix<_Scalar, _Flags, _Index>::Index) [with _Scalar = double, int _Options = 0, _Index = int, Eigen::SparseMatrix<_Scalar, _Flags, _Index>::Scalar = double, Eigen::SparseMatrix<_Scalar, _Flags, _Index>::Index = int]’
cppad_eigen_sparse_test.cpp:12:21: instantiated from here
../include/Eigen/Eigen/src/SparseCore/SparseMatrix.h:226:9: error: call of overloaded ‘reserve(const ConstantReturnType)’ is ambiguous
.../include/Eigen/Eigen/src/SparseCore/SparseMatrix.h:226:9: note: candidates are:
../include/Eigen/Eigen/src/SparseCore/SparseMatrix.h:270:17: note: void Eigen::SparseMatrix<_Scalar, _Flags, _Index>::reserve(const SizesType&, const typename SizesType::value_type&) [with SizesType = Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<int>, Eigen::Matrix<int, -0x00000000000000001, 1> >, _Scalar = double, int _Options = 0, _Index = int, typename SizesType::value_type = int]
../include/Eigen/Eigen/src/SparseCore/SparseMatrix.h:276:17: note: void Eigen::SparseMatrix<_Scalar, _Flags, _Index>::reserve(const SizesType&, const typename SizesType::Scalar&) [with SizesType = Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<int>, Eigen::Matrix<int, -0x00000000000000001, 1> >, _Scalar = double, int _Options = 0, _Index = int, typename SizesType::Scalar = int]
There is already a similar forum post that has been solved:
https://forum.kde.org/viewtopic.php?f=74&t=124099The eigen sparse plugin that Gael suggests fixes the problem with setFromTriplets, but the problem appears again when using coeffRef.