#error if min or max is defined

This commit is contained in:
Benoit Jacob 2009-01-19 13:23:41 +00:00
parent 9ae03f4589
commit dcaa58744e

View File

@ -69,6 +69,13 @@
#include <new> #include <new>
#endif #endif
// this needs to be done after all possible windows C header includes and before any Eigen source includes
// (system C++ includes are supposed to be able to deal with this already):
// windows.h defines min and max macros which would make Eigen fail to compile.
#if defined(min) || defined(max)
#error The preprocessor symbols 'min' or 'max' are defined. If you are compiling on Windows, do #define NOMINMAX to prevent windows.h from defining these symbols.
#endif
namespace Eigen { namespace Eigen {
/** \defgroup Core_Module Core module /** \defgroup Core_Module Core module