From 5aa5c9873877b79c2588d5f33ad9910b02488b00 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Wed, 17 Jun 2020 17:44:03 +0300 Subject: [PATCH] Added #define WIN32_LEAN_AND_MEAN before including windows.h (#1729) Co-authored-by: gabime --- include/fmt/format-inl.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index ea4821c2..f9685399 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -23,12 +23,14 @@ #endif #ifdef _WIN32 -# if defined(NOMINMAX) -# include -# else +# if !defined(NOMINMAX) && !defined(WIN32_LEAN_AND_MEAN) # define NOMINMAX +# define WIN32_LEAN_AND_MEAN # include +# undef WIN32_LEAN_AND_MEAN # undef NOMINMAX +# else +# include # endif # include #endif