some std GNU header files undefined min/max and don't like like either

This commit is contained in:
Gael Guennebaud 2011-09-20 01:47:21 +02:00
parent f698fbed62
commit 1f974f33d8
2 changed files with 18 additions and 3 deletions

View File

@ -23,9 +23,6 @@
// License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>.
#define min(A,B) please_protect_your_min_with_parentheses
#define max(A,B) please_protect_your_max_with_parentheses
#include <cstdlib>
#include <cerrno>
#include <ctime>
@ -33,6 +30,15 @@
#include <string>
#include <vector>
#include <typeinfo>
#include <limits>
#include <algorithm>
#include <sstream>
#include <complex>
#include <deque>
#include <queue>
#define min(A,B) please_protect_your_min_with_parentheses
#define max(A,B) please_protect_your_max_with_parentheses
#ifdef NDEBUG
#undef NDEBUG

View File

@ -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 <tr1/unordered_map>
#define EIGEN_UNORDERED_MAP_SUPPORT
namespace std {