1
0
mirror of https://github.com/gabime/spdlog.git synced 2025-04-29 03:53:54 +00:00

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>
This commit is contained in:
Christian Blichmann 2025-01-07 23:59:12 +01:00 committed by GitHub
parent 276ee5f5c0
commit 7f8060d5b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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