This bugzilla service is closed. All entries have been migrated to
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: 2019-12-04 12:12 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.
Comment 1 Nobody 2019-12-04 12:12:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance:

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