New user self-registration is disabled due to spam. Please email eigen-core-team @ if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 575 - cannot access private typedef in sparse_diagonal_product_inner_iterator_selector
Summary: cannot access private typedef in sparse_diagonal_product_inner_iterator_selector
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.2
Hardware: All Windows
: Normal Unknown
Assignee: Nobody
Depends on:
Reported: 2013-03-25 17:44 UTC by Angelos
Modified: 2013-03-25 17:44 UTC (History)
0 users


Description Angelos 2013-03-25 17:44:53 UTC
In  VisualStudio 10 compiler I got:

'Eigen::internal::sparse_diagonal_product_inner_iterator_selector<Lhs,Rhs,SparseDiagonalProductType?,RhsMode?,LhsMode?>::Index' : cannot access private typedef declared in class 'Eigen::internal::sparse_diagonal_product_inner_iterator_selector<Lhs,Rhs,SparseDiagonalProductType?,RhsMode?,LhsMode?>'

When trying the product of a diagonal matrix and a sparse matrix:

Eigen::Vector<double> v(10);
Eigen::SparseMatrix<double> M(10,10);

v.cwiseInverse().asDiagonal() * M ;

I was able to get around this by declaring 

typedef typename Lhs::Index Index; 

as public in


Not sure if it's really a bug, or there is a reason for this Index to be private.

Note You need to log in before you can comment on or make changes to this bug.