mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-14 22:07:38 +00:00
Fix a couple of issues in MSVC related to min
and max
.
MSVC apparently thinks that the result of arithmetic promotions on an `unsigned:4` bitfield is `unsigned`, not `int`; which then causes it to fail to deduce whether the `T` in `min<T>` should be `unsigned` (the type of the LHS) or `int` (the type of the RHS). Clang and GCC agree that the result of arithmetic promotions on an `unsigned:4` bitfield should be `int`, so they don't see any ambiguity here.
This commit is contained in:
@@ -253,6 +253,7 @@
|
||||
#if ISWINDOWS
|
||||
#define hyper fake_hyper // avoid "hyper" typedef in <_mingw.h>
|
||||
#define WIN32_LEAN_AND_MEAN // avoid "rad1" macro in <windows.h>
|
||||
#define NOMINMAX // avoid "min" and "max" macros in <windows.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
Reference in New Issue
Block a user