-// We need to define this in order to use the numeric limit
-// values provided by the C++ standard library.
-#define NOMINMAX
+// If we don't define these, they get defined in windef.h.
+// We want to use std::min and std::max
+#define max max
+#define min min