From 89601ee253c673ea08ac77de112d587d25782c05 Mon Sep 17 00:00:00 2001 From: Philip Top Date: Thu, 16 Feb 2023 05:24:47 -0800 Subject: [PATCH] fix: isolate definition of NOMINMA and skip undef if defined (#848) --- include/CLI/impl/Argv_inl.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/CLI/impl/Argv_inl.hpp b/include/CLI/impl/Argv_inl.hpp index 771154ff..3d00a570 100644 --- a/include/CLI/impl/Argv_inl.hpp +++ b/include/CLI/impl/Argv_inl.hpp @@ -31,16 +31,23 @@ #define _ARM_ #endif #endif -#define NOMINMAX + // first +#ifndef NOMINMAX +// if NOMINMAX is already defined we don't want to mess with that either way +#define NOMINMAX #include +#undef NOMINMAX +#else +#include +#endif + // second #include // third #include #include -#undef NOMINMAX #elif defined(__APPLE__) #include #endif