From e1c5dfecac2f5aca9cf4a60ecb10cc93e5c635e2 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Thu, 4 Aug 2022 15:24:46 +0300 Subject: [PATCH] Update common.h --- include/spdlog/common.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index a3554c63..6b5fb1a9 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -44,16 +44,15 @@ #include -#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 -# endif -# else -# define SPDLOG_FMT_RUNTIME(format_string) format_string -# define SPDLOG_FMT_STRING(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) +# define SPDLOG_FMT_STRING(format_string) FMT_STRING(format_string) +# if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) +# include # endif +#else +# define SPDLOG_FMT_RUNTIME(format_string) format_string +# define SPDLOG_FMT_STRING(format_string) format_string #endif #ifdef __has_feature