forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(conan-io#17976) spdlog: bump fmt10.0.0 and apply patch to fix build …
…error
- Loading branch information
1 parent
3ab0b95
commit 62c5984
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
recipes/spdlog/all/patches/1.11.0-0001-fix-fmt10-build.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 576210a1363822a132657090b9f37e305bd0e2c2 Mon Sep 17 00:00:00 2001 | ||
From: pwqbot <ding00000804@gmail.com> | ||
Date: Tue, 20 Jun 2023 10:41:48 +0800 | ||
Subject: [PATCH] fix fmt build | ||
|
||
--- | ||
include/spdlog/common.h | 9 ++++++++- | ||
1 file changed, 8 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/include/spdlog/common.h b/include/spdlog/common.h | ||
index f97fd48c..00f4d728 100644 | ||
--- a/include/spdlog/common.h | ||
+++ b/include/spdlog/common.h | ||
@@ -160,12 +160,19 @@ using format_string_t = fmt::format_string<Args...>; | ||
template<class T> | ||
using remove_cvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type; | ||
|
||
+template<typename Char> | ||
+# if FMT_VERSION >= 90101 | ||
+using fmt_runtime_string = fmt::runtime_format_string<Char>; | ||
+# else | ||
+using fmt_runtime_string = fmt::basic_runtime<Char>; | ||
+# 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<Char> is only convertible to basic_format_string<Char> but not basic_string_view<Char> | ||
template<class T, class Char = char> | ||
struct is_convertible_to_basic_format_string | ||
: std::integral_constant<bool, | ||
- std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt::basic_runtime<Char>>::value> | ||
+ std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt_runtime_string<Char>>::value> | ||
{}; | ||
|
||
# if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) |