suppress warning 4307 when including format-inline.h under msvc 2017

This commit is contained in:
gabime 2022-10-31 17:47:12 +02:00
parent a7e2bf161e
commit 14a29c03eb
2 changed files with 13 additions and 2 deletions

View File

@ -21,9 +21,20 @@
# endif
// enable the 'n' flag in for backward compatibility with fmt 6.x
# define FMT_DEPRECATED_N_SPECIFIER
// 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 <spdlog/fmt/bundled/core.h>
# include <spdlog/fmt/bundled/format.h>
#else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib
# include <fmt/core.h>
# include <fmt/format.h>
#endif
#if defined(_MSC_VER) && ((_MSC_VER >= 1910) && (_MSC_VER <= 1916))
# pragma warning(pop)
#endif

View File

@ -9,13 +9,13 @@
#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)
#if defined(_MSC_VER) && ((_MSC_VER >= 1910) && (_MSC_VER <= 1916))
# pragma warning(push)
# pragma warning(disable : 4307)
#endif
# include <spdlog/fmt/bundled/format-inl.h>
#if defined(_MSC_VER)
#if defined(_MSC_VER) && ((_MSC_VER >= 1910) && (_MSC_VER <= 1916))
# pragma warning(pop)
#endif