Skip to content

fix: Compatibility with external fmtlib 11.1.1#3312

Merged
gabime merged 1 commit intogabime:v1.xfrom
cblichmann:fmt11.1.1-xchar
Jan 7, 2025
Merged

fix: Compatibility with external fmtlib 11.1.1#3312
gabime merged 1 commit intogabime:v1.xfrom
cblichmann:fmt11.1.1-xchar

Conversation

@cblichmann
Copy link
Copy Markdown
Contributor

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) {
      |                                                 ^~~~~

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 <[email protected]>
@gabime gabime merged commit 7f8060d into gabime:v1.x Jan 7, 2025
@gabime
Copy link
Copy Markdown
Owner

gabime commented Jan 7, 2025

Thanks @cblichmann

yachoor added a commit to yachoor/spdlog that referenced this pull request Jan 30, 2025
gabime pushed a commit that referenced this pull request Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants