Skip to content

Commit 5b9ccaf

Browse files
authored
Fixed possible macro redefinition (#1892)
MinGW libstdc++ may define `NOMINMAX` unconditionally. This fixes the case when it is already defined.
1 parent 9cbf50c commit 5b9ccaf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/main/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
#include <unistd.h>
2424
#elif defined (_WIN32)
2525
#define WIN32_LEAN_AND_MEAN
26+
#ifndef NOMINMAX
2627
#define NOMINMAX
28+
#endif
2729
#include <windows.h>
2830
#include <signal.h>
2931
#endif

0 commit comments

Comments
 (0)