From 4ba90173532b3e38ab25645a8349b1b82a70b786 Mon Sep 17 00:00:00 2001 From: guoliang Date: Thu, 20 Aug 2020 11:20:56 +0800 Subject: [PATCH] Fix the MSVC warning C4566 --- include/spdlog/fmt/bundled/core.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/spdlog/fmt/bundled/core.h b/include/spdlog/fmt/bundled/core.h index 0e0824f5..e8942f29 100644 --- a/include/spdlog/fmt/bundled/core.h +++ b/include/spdlog/fmt/bundled/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. @@ -324,7 +326,8 @@ FMT_CONSTEXPR typename std::make_unsigned::type to_unsigned(Int value) { return static_cast::type>(value); } -constexpr unsigned char micro[] = "\u00B5"; +// 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 ||