Workaround unfortunate macro definition in `windows.h`
This commit is contained in:
parent
a5a33bbcef
commit
4d96a82ed9
|
@ -20,6 +20,13 @@
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
// note: The windows header seriously defines a macro called "max" breaking the (common) use
|
||||||
|
// of std::numeric_limits in the subsequent code. So we need to undefine this macro. Note that
|
||||||
|
// this is not the case using mingw-w64 but it is happening with windows.h from Windows Kits
|
||||||
|
// version 10.0.22000.0 via Visual Studio 2022.
|
||||||
|
#ifdef max
|
||||||
|
#undef max
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
Loading…
Reference in New Issue