From 651fc42cab4f1f8a664f6ff964be0fb9d4c7dfe1 Mon Sep 17 00:00:00 2001 From: H1X4 <10332146+H1X4Dev@users.noreply.github.com> Date: Fri, 31 Mar 2023 19:27:10 +0300 Subject: [PATCH] update fmt_runtime_string macro --- include/spdlog/common.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index ddd9fd67..dfe7c76c 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -173,10 +173,11 @@ using format_string_t = fmt::format_string; template using remove_cvref_t = typename std::remove_cv::type>::type; +template #if FMT_VERSION >= 90101 -# define FMT_STRING_RUNTIME fmt::runtime_format_string +using fmt_runtime_string = fmt::runtime_format_string; #else -# define FMT_STRING_RUNTIME fmt::basic_runtime +using fmt_runtime_string = fmt::basic_runtime; #endif // clang doesn't like SFINAE disabled constructor in std::is_convertible<> so have to repeat the condition from basic_format_string here, @@ -184,7 +185,7 @@ using remove_cvref_t = typename std::remove_cv template struct is_convertible_to_basic_format_string : std::integral_constant>::value || std::is_same, FMT_STRING_RUNTIME>::value> + std::is_convertible>::value || std::is_same, fmt_runtime_string>::value> {}; # if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)