https://github.com/gabime/spdlog/commit/7f8060d5b280eac9786f92ac74d263cc8359c5ed
https://github.com/gabime/spdlog/commit/96a8f6250cbf4e8c76387c614f666710a2fa9bad

From 7f8060d5b280eac9786f92ac74d263cc8359c5ed Mon Sep 17 00:00:00 2001
From: Christian Blichmann <cblichmann@users.noreply.github.com>
Date: Tue, 7 Jan 2025 23:59:12 +0100
Subject: [PATCH] fix: Compatibility with external fmtlib 11.1.1 (#3312)

Include fmtlib's `xchar` header to include `fmt::basic_format_string`.
Otherwise, compilation with an external fmtlib 11.1.1 fails with

```
In file included from include/spdlog/spdlog.h:12:
include/spdlog/common.h:369:49: error: no template named 'basic_format_string' in namespace 'fmt'; did you mean 'std::basic_format_string'?
  369 | inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
      |                                                 ^~~~~
```

Signed-off-by: Christian Blichmann <cblichmann@google.com>
---
 include/spdlog/fmt/fmt.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h
index 7fa6b0933..2f09c15ed 100644
--- a/include/spdlog/fmt/fmt.h
+++ b/include/spdlog/fmt/fmt.h
@@ -27,4 +27,5 @@
 #else  // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib
     #include <fmt/core.h>
     #include <fmt/format.h>
+    #include <fmt/xchar.h>
 #endif

From 96a8f6250cbf4e8c76387c614f666710a2fa9bad Mon Sep 17 00:00:00 2001
From: jdrouhard <john@drouhard.dev>
Date: Thu, 9 Jan 2025 16:58:46 -0600
Subject: [PATCH] fix: remove unused to_string_view overload in fmt >= 11.1
 (#3314)

---
 include/spdlog/common.h | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/include/spdlog/common.h b/include/spdlog/common.h
index 2d73f8300..71ffd2403 100644
--- a/include/spdlog/common.h
+++ b/include/spdlog/common.h
@@ -364,19 +364,7 @@ SPDLOG_CONSTEXPR_FUNC spdlog::wstring_view_t to_string_view(spdlog::wstring_view
 }
 #endif
 
-#ifndef SPDLOG_USE_STD_FORMAT
-#if FMT_VERSION >= 110100
-template <typename T, typename... Args>
-inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_arg<T> fmt) {
-    return fmt;
-}
-#else
-template <typename T, typename... Args>
-inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
-    return fmt;
-}
-#endif
-#elif __cpp_lib_format >= 202207L
+#if defined(SPDLOG_USE_STD_FORMAT) &&  __cpp_lib_format >= 202207L
 template <typename T, typename... Args>
 SPDLOG_CONSTEXPR_FUNC std::basic_string_view<T> to_string_view(
     std::basic_format_string<T, Args...> fmt) SPDLOG_NOEXCEPT {
