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

Workaround deprecation warning on Clang with C++20 #2499

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

offa
Copy link
Contributor

@offa offa commented Sep 29, 2022

Compilation on Clang with C++20 (or later) and bundled fmt 8.x causes a deprecation warning:

In file included from […]/spdlog/example/example.cpp:132:
In file included from […]/spdlog/include/spdlog/sinks/daily_file_sink.h:10:
In file included from […]/spdlog/include/spdlog/fmt/chrono.h:18:
[…]/spdlog/include/spdlog/fmt/bundled/chrono.h:324:24: fatal error: 'codecvt<char32_t, char, __mbstate_t>' is deprecated [-Wdeprecated-declarations]
  using codecvt = std::codecvt<CodeUnit, char, std::mbstate_t>;
                       ^
[…]/spdlog/include/spdlog/fmt/bundled/chrono.h:358:5: note: in instantiation of function template specialization 'fmt::detail::write_codecvt<char32_t>' requested here
    write_codecvt(unit, in, loc);
    ^

This has been fixed in fmt 9.x according to it's upstream PR (fmtlib/fmt#2725)

Related

@gabime gabime merged commit 523a075 into gabime:v1.x Sep 29, 2022
@gabime
Copy link
Owner

gabime commented Sep 29, 2022

Thanks @offa

@offa offa deleted the clang_cpp20_workaround branch September 30, 2022 05:28
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