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.
This commit is contained in:
vitaut 2015-04-30 07:48:36 -07:00
parent f44666aac6
commit 67ce394256

View File

@ -39,7 +39,13 @@
# ifdef __MINGW32__ # ifdef __MINGW32__
# include <cstring> # include <cstring>
# endif # endif
# if defined(NOMINMAX) || defined(FMT_WIN_MINMAX)
# include <windows.h> # include <windows.h>
# else
# define NOMINMAX
# include <windows.h>
# undef NOMINMAX
# endif
#endif #endif
using fmt::internal::Arg; using fmt::internal::Arg;