From 67ce39425636e329688f140b8c60f7d6adf6ee4d Mon Sep 17 00:00:00 2001 From: vitaut Date: Thu, 30 Apr 2015 07:48:36 -0700 Subject: [PATCH] Undefine Windows min/max macros (#152) because they break std::min/max. This only affects non-default header-only configuration and can be disabled by defining FMT_WIN_MINMAX. --- format.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/format.cc b/format.cc index fe4f1b18..9fd32de4 100644 --- a/format.cc +++ b/format.cc @@ -39,7 +39,13 @@ # ifdef __MINGW32__ # include # endif -# include +# if defined(NOMINMAX) || defined(FMT_WIN_MINMAX) +# include +# else +# define NOMINMAX +# include +# undef NOMINMAX +# endif #endif using fmt::internal::Arg;