New user self-registration is currently disabled. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Bug 1147 - unneeded #include to <complex.h> in PaStiXSupport
unneeded #include to <complex.h> in PaStiXSupport
Status: RESOLVED FIXED
Product: Eigen
Classification: Unclassified
Component: Sparse
3.3 (current stable)
All All
: Normal Compilation Problem
Assigned To: Nobody
:
: 722 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-20 13:34 UTC by fabien chêne
Modified: 2016-01-20 17:51 UTC (History)
3 users (show)



Attachments

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).

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

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.

https://bitbucket.org/eigen/eigen/commits/582ad91f6672/
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.