From 9c995a6b583e758ad67e955cb9af07f4f563e1bd Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 21 Jun 2014 09:47:37 -0700 Subject: [PATCH] Don't use undefined _MSC_VER. --- format.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/format.h b/format.h index 37f6980d..9bd4f131 100644 --- a/format.h +++ b/format.h @@ -71,13 +71,19 @@ # define FMT_HAS_BUILTIN(x) 0 #endif +#ifdef _MSC_VER +# define FMT_MSC_VER _MSC_VER +#else +# define FMT_MSC_VER 0 +#endif + #ifndef FMT_USE_VARIADIC_TEMPLATES // Variadic templates are available in GCC since version 4.4 // (http://gcc.gnu.org/projects/cxx0x.html) and in Visual C++ // since version 2013. # define FMT_USE_VARIADIC_TEMPLATES \ (FMT_HAS_FEATURE(cxx_variadic_templates) || \ - (FMT_GCC_VERSION >= 404 && __cplusplus >= 201103) || _MSC_VER >= 1800) + (FMT_GCC_VERSION >= 404 && __cplusplus >= 201103) || FMT_MSC_VER >= 1800) #endif #ifndef FMT_USE_RVALUE_REFERENCES @@ -88,7 +94,7 @@ # else # define FMT_USE_RVALUE_REFERENCES \ (FMT_HAS_FEATURE(cxx_rvalue_references) || \ - (FMT_GCC_VERSION >= 403 && __cplusplus >= 201103) || _MSC_VER >= 1600) + (FMT_GCC_VERSION >= 403 && __cplusplus >= 201103) || FMT_MSC_VER >= 1600) # endif #endif @@ -110,7 +116,7 @@ TypeName(const TypeName&); \ void operator=(const TypeName&) -#if _MSC_VER +#if FMT_MSC_VER # pragma warning(push) # pragma warning(disable: 4521) // 'class' : multiple copy constructors specified #endif @@ -2052,7 +2058,7 @@ inline void FormatDec(char *&buffer, T value) { // Restore warnings. #if FMT_GCC_VERSION >= 406 # pragma GCC diagnostic pop -#elif _MSC_VER +#elif FMT_MSC_VER # pragma warning(pop) #endif