From 5b9ccaf104cc1054d4f8f17bc8a4b8dc949e5527 Mon Sep 17 00:00:00 2001 From: FrankHB Date: Sat, 17 Jun 2023 02:25:01 +0800 Subject: [PATCH] Fixed possible macro redefinition (#1892) MinGW libstdc++ may define `NOMINMAX` unconditionally. This fixes the case when it is already defined. --- examples/main/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/main/main.cpp b/examples/main/main.cpp index ef9e75fab..a051fcbc5 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -23,7 +23,9 @@ #include #elif defined (_WIN32) #define WIN32_LEAN_AND_MEAN +#ifndef NOMINMAX #define NOMINMAX +#endif #include #include #endif