From 9125bda30179fc0867c676c1bd5553bea8f44713 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 31 Oct 2022 17:03:53 +0200 Subject: [PATCH] suppress "integral constant overflow" warning under msvc 2017 --- src/bundled_fmtlib_format.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/bundled_fmtlib_format.cpp b/src/bundled_fmtlib_format.cpp index 51d5e073..ada16cd7 100644 --- a/src/bundled_fmtlib_format.cpp +++ b/src/bundled_fmtlib_format.cpp @@ -7,8 +7,19 @@ #endif #if !defined(SPDLOG_FMT_EXTERNAL) && !defined(SPDLOG_USE_STD_FORMAT) + +// suppress "integral constant overflow" warning under msvc 2017 (which doesn't appear in other msvc versions) +#if defined(_MSC_VER) && (_MSC_VER >= 1910) && (_MSC_VER <= 1916) +# pragma warning(push) +# pragma warning(disable : 4307) +#endif # include +#if defined(_MSC_VER) +# pragma warning(pop) +#endif + + FMT_BEGIN_NAMESPACE namespace detail {