Switch to vformat_to

Drive-by: reduce the amount of occurences of #ifdef SPDLOG_USE_STD_FORMAT
This commit is contained in:
Charles Milette
2022-04-21 21:46:58 -04:00
parent b3ce5ed379
commit ebeb3707b1
10 changed files with 66 additions and 166 deletions

View File

@@ -44,15 +44,13 @@
#include <spdlog/fmt/fmt.h>
#ifndef SPDLOG_USE_STD_FORMAT
# if FMT_VERSION >= 80000 // backward compatibility with fmt versions older than 8
# define SPDLOG_FMT_RUNTIME(format_string) fmt::runtime(format_string)
# if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
# include <spdlog/fmt/xchar.h>
# endif
# else
# define SPDLOG_FMT_RUNTIME(format_string) format_string
#if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION >= 80000 // backward compatibility with fmt versions older than 8
# define SPDLOG_FMT_RUNTIME(format_string) fmt::runtime(format_string)
# if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
# include <spdlog/fmt/xchar.h>
# endif
#else
# define SPDLOG_FMT_RUNTIME(format_string) format_string
#endif
// visual studio up to 2013 does not support noexcept nor constexpr