From 36ea32640fecc775d16fd337c447762bede3eac1 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 10 Apr 2020 06:36:50 -0700 Subject: [PATCH] Suppress a bogus MSVC warning --- include/fmt/core.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index b79dbe02..c88439be 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -71,8 +71,10 @@ #ifdef _MSC_VER # define FMT_MSC_VER _MSC_VER +# define FMT_SUPPRESS_MSC_WARNING(n) __pragma(warning(suppress : n)) #else # define FMT_MSC_VER 0 +# define FMT_SUPPRESS_MSC_WARNING(n) #endif // Check if relaxed C++14 constexpr is supported. @@ -325,7 +327,7 @@ FMT_CONSTEXPR typename std::make_unsigned::type to_unsigned(Int value) { return static_cast::type>(value); } -constexpr unsigned char micro[] = "\u00B5"; +FMT_SUPPRESS_MSC_WARNING(4566) constexpr unsigned char micro[] = "\u00B5"; template constexpr bool is_unicode() { return FMT_UNICODE || sizeof(Char) != 1 ||