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

Bug 1143

Summary: Parsing error with template in Eigen_Colamd.h
Product: Eigen Reporter: Jérémie <jeremie.dumas>
Component: SparseAssignee: Nobody <eigen.nobody>
Severity: Unknown CC: chtz, gael.guennebaud
Priority: Normal    
Version: 3.2   
Hardware: All   
OS: All   
Description Flags
Minimal example code to reproduce the bug. none

Description Jérémie 2016-01-05 09:49:53 UTC
Created attachment 643 [details]
Minimal example code to reproduce the bug.

In the file Eigen_Colamd.h, the line 519 "if (Col [col].length < 0)" can sometimes lead to compilation errors depending on the surrounding user code.

A seemingly benign minimal example is given in attachment, where the user creates a templated "length" function, included in a header before Eigen. This leads to compilation errors "Eigen_Colamd.h:519:19: error: parse error in template argument list" and "Eigen_Colamd.h:519:5: error: ‘length’ is not a member template function".

Using > instead of < for the comparison does the trick here, but there might be some other places where such an issue can arise.
Comment 1 Christoph Hertzberg 2016-01-06 11:04:38 UTC
Thanks for the report. This is likely caused by a gcc bug:

I worked-around using parentheses (for devel and 3.2):
Comment 2 Nobody 2019-12-04 15:18:57 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: