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

Add missing xchar.h header for fmt > 11.0.2 #3274

Closed
wants to merge 1 commit into from

Conversation

ahoarau
Copy link

@ahoarau ahoarau commented Nov 30, 2024

Using fmt main branch, after the 11.0.2 release, fmt::basic_format_string is defined in xchar.h.

Otherwise compile error:

spdlog/common.h:369:49: error: no template named 'basic_format_string' in namespace 'fmt'; did you mean 'std::basic_format_string'?
[build]   369 | inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
[build]       |                                                 ^~~~~
[build] /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/format:128:12: note: 'std::basic_format_string' declared here
[build]   128 |     struct basic_format_string
[build]       |            ^
[build] 1 error generated.

using fmt main branch, after the 11.0.2 release, `fmt::basic_format_string` is defined in `xchar.h`.
Otherwise compile error:
```
spdlog/common.h:369:49: error: no template named 'basic_format_string' in namespace 'fmt'; did you mean 'std::basic_format_string'?
[build]   369 | inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
[build]       |                                                 ^~~~~
[build] /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/format:128:12: note: 'std::basic_format_string' declared here
[build]   128 |     struct basic_format_string
[build]       |            ^
[build] 1 error generated.
```
@gabime
Copy link
Owner

gabime commented Nov 30, 2024

Something is wrong. It is already defined here

#include <fmt/xchar.h>

@ahoarau
Copy link
Author

ahoarau commented Nov 30, 2024

@gabime I just saw that.. Not the right patch for the issue. Investiguating.

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