Assignment: multiple overloads have similar conversions

Submitted by Hauke Heibel

Assigned to Nobody

Link to original bugzilla bug (#164)
Version: 3.0

Description

The following code triggers a compiler error on MSVC:

#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET

#include <Eigen/Eigen>

#include <Eigen/Sparse>

using namespace Eigen;

int main()

{

DynamicSparseMatrix<double> m, n;

m = n.transpose();

}

and the following modified message is produced by the compiler:

error C2666: 'Eigen::DynamicSparseMatrix<double>::operator =' : 3 overloads have similar conversions

could be 'Eigen::DynamicSparseMatrix<double> &Eigen::DynamicSparseMatrix<double>::operator =(const Eigen::DynamicSparseMatrix<double> &)'

or 'Eigen::DynamicSparseMatrix<double> &Eigen::SparseMatrixBaseEigen::DynamicSparseMatrix<double>::operator =<Eigen::Transpose<const Eigen::DynamicSparseMatrix<double>>>(const Eigen::EigenBase<Eigen::Transpose<const Eigen::DynamicSparseMatrix<double>>> &)'

or 'Eigen::DynamicSparseMatrix<double> &Eigen::SparseMatrixBaseEigen::DynamicSparseMatrix<double>::operator =<Eigen::Transpose<const Eigen::DynamicSparseMatrix<double>>>(const Eigen::SparseMatrixBase<Eigen::Transpose<const Eigen::DynamicSparseMatrix<double>>> &)'

while trying to match the argument list '(Eigen::DynamicSparseMatrix<double>, const Eigen::Transpose<const Eigen::DynamicSparseMatrix<double>>)'

Blocking

#48 (closed)