From a77f3c995b16514ea4de7142e26d12b72b6cd4ca Mon Sep 17 00:00:00 2001 From: H1X4 <10332146+H1X4Dev@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:05:34 +0300 Subject: [PATCH] fix build for master fmt (non-bundled) --- include/spdlog/common.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index e69201a8..ddd9fd67 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -173,12 +173,18 @@ using format_string_t = fmt::format_string; template using remove_cvref_t = typename std::remove_cv::type>::type; +#if FMT_VERSION >= 90101 +# define FMT_STRING_RUNTIME fmt::runtime_format_string +#else +# define FMT_STRING_RUNTIME 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, // in addition, fmt::basic_runtime is only convertible to basic_format_string but not basic_string_view template struct is_convertible_to_basic_format_string : std::integral_constant>::value || std::is_same, fmt::basic_runtime>::value> + std::is_convertible>::value || std::is_same, FMT_STRING_RUNTIME>::value> {}; # if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)