From 1f974f33d806ce74d3137ce95cafcf60c0ce613a Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 20 Sep 2011 01:47:21 +0200 Subject: [PATCH] some std GNU header files undefined min/max and don't like like either --- test/main.h | 12 +++++++++--- test/sparse.h | 9 +++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/test/main.h b/test/main.h index a8c6303b0..4ddd11e6b 100644 --- a/test/main.h +++ b/test/main.h @@ -23,9 +23,6 @@ // License and a copy of the GNU General Public License along with // Eigen. If not, see . -#define min(A,B) please_protect_your_min_with_parentheses -#define max(A,B) please_protect_your_max_with_parentheses - #include #include #include @@ -33,6 +30,15 @@ #include #include #include +#include +#include +#include +#include +#include +#include + +#define min(A,B) please_protect_your_min_with_parentheses +#define max(A,B) please_protect_your_max_with_parentheses #ifdef NDEBUG #undef NDEBUG diff --git a/test/sparse.h b/test/sparse.h index 949a597fc..cc9da4855 100644 --- a/test/sparse.h +++ b/test/sparse.h @@ -29,6 +29,15 @@ #include "main.h" #if EIGEN_GNUC_AT_LEAST(4,0) && !defined __ICC && !defined(__clang__) + +#ifdef min +#undef min +#endif + +#ifdef max +#undef max +#endif + #include #define EIGEN_UNORDERED_MAP_SUPPORT namespace std {