From a5e253162b089a44bdd8dcba1d84cfd142d901cf Mon Sep 17 00:00:00 2001 From: leper Date: Sat, 8 Jul 2017 00:15:03 +0000 Subject: [PATCH] Fix undefined macro usage in cppformat. This is quite noisy with -Wexpansion-to-defined in both clang 3.9 and gcc 7. (Refs #3190 and #4148. Upstream might have fixed this, but somewhat clean build logs seem worth it.) Reviewed By: echotangoecho Differential Revision: https://code.wildfiregames.com/D680 This was SVN commit r19884. --- source/third_party/cppformat/format.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/third_party/cppformat/format.h b/source/third_party/cppformat/format.h index 5e9fa96627..887cdcef2e 100644 --- a/source/third_party/cppformat/format.h +++ b/source/third_party/cppformat/format.h @@ -81,9 +81,13 @@ // Variadic templates are available in GCC since version 4.4 // (http://gcc.gnu.org/projects/cxx0x.html) and in Visual C++ // since version 2013. +# if defined(_MSC_VER) && _MSC_VER >= 1800 +# define FMT_USE_VARIADIC_TEMPLATES 1 +# else # define FMT_USE_VARIADIC_TEMPLATES \ (FMT_HAS_FEATURE(cxx_variadic_templates) || \ - (FMT_GCC_VERSION >= 404 && __cplusplus >= 201103) || (defined(_MSC_VER) && _MSC_VER >= 1800)) + (FMT_GCC_VERSION >= 404 && __cplusplus >= 201103)) +# endif #endif #ifndef FMT_USE_RVALUE_REFERENCES @@ -91,10 +95,12 @@ // as the latter doesn't provide std::move. # if defined(FMT_GNUC_LIBSTD_VERSION) && FMT_GNUC_LIBSTD_VERSION <= 402 # define FMT_USE_RVALUE_REFERENCES 0 +# elif defined(_MSC_VER) && _MSC_VER >= 1600 +# define FMT_USE_RVALUE_REFERENCES 1 # else # define FMT_USE_RVALUE_REFERENCES \ (FMT_HAS_FEATURE(cxx_rvalue_references) || \ - (FMT_GCC_VERSION >= 403 && __cplusplus >= 201103) || (defined(_MSC_VER) && _MSC_VER >= 1600)) + (FMT_GCC_VERSION >= 403 && __cplusplus >= 201103)) # endif #endif