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: adapt to fmt 9.0.0 breaking changes #1617

Merged
merged 3 commits into from
Jul 18, 2022
Merged

Conversation

alebastr
Copy link
Contributor

Addresses the following breaking change:

Disabled automatic std::ostream insertion operator (operator<<) discovery when fmt/ostream.h is included to prevent ODR violations. You can get the old behavior by defining FMT_DEPRECATED_OSTREAM but this will be removed in the next major release. Use fmt::streamed or fmt::ostream_formatter to enable formatting via std::ostream instead.

The patch is good enough to fix builds in distributions updating to fmt 9. WIP because it's already late and I need to give it another look tomorrow; there's one more deprecation warning I want to address:

../subprojects/fmt/include/fmt/core.h:1711:43: warning: 'map<mpd_idle, 0>' is deprecated [-Wdeprecated-declarations]           
  const auto& arg = arg_mapper<Context>().map(std::forward<T>(val));                                                           
                                          ^                                                                                                                                                                                                                    
../subprojects/fmt/include/fmt/core.h:1451:3: note: 'map<mpd_idle, 0>' has been explicitly marked deprecated here
  FMT_DEPRECATED FMT_CONSTEXPR FMT_INLINE auto map(const T& val)                                                               
  ^                                                                                                                                                                                                                                                                                                                                                                                                                                       
...
../src/modules/mpd/state.cpp:81:11: note: in instantiation of function template specialization 'spdlog::debug<mpd_idle &>' requested here
  spdlog::debug("mpd: Idle: recv_idle events -> {}", events);

@alebastr alebastr marked this pull request as ready for review July 14, 2022 05:49
@Alexays
Copy link
Owner

Alexays commented Jul 18, 2022

Thanks @alebastr!

@Alexays Alexays merged commit d906080 into Alexays:master Jul 18, 2022
@alebastr alebastr deleted the fmt-9 branch July 18, 2022 15:18
@chrBrd chrBrd mentioned this pull request Oct 16, 2022
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