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 1147 - unneeded #include to <complex.h> in PaStiXSupport
Summary: unneeded #include to <complex.h> in PaStiXSupport
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Compilation Problem
Assignee: Nobody
: 722 (view as bug list)
Depends on:
Reported: 2016-01-20 13:34 UTC by fabien chêne
Modified: 2016-01-20 17:51 UTC (History)
3 users (show)


Description fabien chêne 2016-01-20 13:34:00 UTC
The following code does not compile (at least with g++ 4.8.2, both in C++98 and C++11).

#include <Eigen/PaStiXSupport>
void f( int I );

This is because of the magic 'I' introduced by <complex.h>.
It seems the pastix support code does not use <complex.h>, but only <complex>.
Just including <complex> instead of <complex.h> in <Eigen/PaStiXSupport> would avoid this issue. It fixes the problem for me.

(In practice I is a name commonly used, for example by Boost.Test).
Comment 1 Gael Guennebaud 2016-01-20 17:50:22 UTC
Thanks for the precise report.
Summary:     Bug 1147: fix compilation of PastixSupport
Comment 2 Gael Guennebaud 2016-01-20 17:51:40 UTC
*** Bug 722 has been marked as a duplicate of this bug. ***

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