Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@chenrui333
Copy link
Contributor

update to_string_view function for fmt 11.1

/tmp/spdlog-20241225-25576-12pt7n/spdlog-1.15.0/include/spdlog/common.h:369:54: error: no template named 'basic_format_string' in namespace 'fmt'; did you mean 'basic_format_arg'?
  369 | inline fmt::basic_string_view<Tasic_sfmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
      |                                                 ~~~~~^~~~~~~~~~~~~~~~~~~
      |                                                      basic_format_arg
/opt/homebrew/include/fmt/base.h:2428:35: note: 'basic_format_arg' declared here
 2428 | template <typename Context> class basic_format_arg {
      |                                   ^

relates to Homebrew/homebrew-core#202442

@heitbaum
Copy link

Tested - working 👍

@tt4g
Copy link
Contributor

tt4g commented Dec 26, 2024

Related #3258, #3202 (PR #3277)

@gabime gabime merged commit 276ee5f into gabime:v1.x Dec 26, 2024
15 checks passed
@gabime
Copy link
Owner

gabime commented Dec 26, 2024

Thanks @chenrui333

@fasiondog
Copy link

👍🏻 waiting for new release ...

@jdrouhard
Copy link
Contributor

The new code for fmt >= 11.1.0 in this PR is dead...no reason to have a to_string_view(basic_format_arg<>) since that's never used.

The new fmt::format_string<> in fmt 11.1.0 implicitly converts to spdlog::string_view_t which already has a to_string_view() overload.

@gabime
Copy link
Owner

gabime commented Jan 2, 2025

@chenrui333 Not sure i understand. It clearly fixed the problem with 11.1.0

@jdrouhard
Copy link
Contributor

@chenrui333 Not sure i understand. It clearly fixed the problem with 11.1.0

It's dead code. You can just make it a #ifndef and remove the to_string_view(fmt::basic_format_arg<>()...) overload. The new overload isn't used.

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.

6 participants