Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Compatibility with external fmtlib 11.1.1 #3312

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

cblichmann
Copy link
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
1 check passed
@gabime
Copy link
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