This bugzilla service is closed. All entries have been migrated to

Bug 575

Summary: cannot access private typedef in sparse_diagonal_product_inner_iterator_selector
Product: Eigen Reporter: Angelos <filiatra>
Component: SparseAssignee: Nobody <eigen.nobody>
Status: NEW ---    
Severity: Unknown    
Priority: Normal    
Version: 3.2   
Hardware: All   
OS: Windows   

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: