From be7d72ba0d4ac1334dcfd8877345d8da25fdd234 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 27 Aug 2017 06:45:59 -0700 Subject: [PATCH] Fix expansion-to-defined warning --- fmt/format.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fmt/format.h b/fmt/format.h index 58d297b6..c364cbaa 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -205,11 +205,14 @@ // makes the fmt::literals implementation easier. However, an explicit check // for variadic templates is added here just in case. // For Intel's compiler both it and the system gcc/msc must support UDLs. -# define FMT_USE_USER_DEFINED_LITERALS \ - FMT_USE_RVALUE_REFERENCES && \ +# if FMT_USE_RVALUE_REFERENCES && \ (FMT_HAS_FEATURE(cxx_user_literals) || \ - FMT_GCC_VERSION >= 407 || FMT_MSC_VER >= 1900) && \ + FMT_GCC_VERSION >= 407 || FMT_MSC_VER >= 1900) && \ (!defined(FMT_ICC_VERSION) || FMT_ICC_VERSION >= 1500) +# define FMT_USE_USER_DEFINED_LITERALS 1 +# else +# define FMT_USE_USER_DEFINED_LITERALS 0 +# endif #endif #ifndef FMT_ASSERT