-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Support compile-time format string checking with std::format #2544
Conversation
|
||
#ifndef SPDLOG_USE_STD_FORMAT | ||
template<typename T, typename... Args> | ||
inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn’t this be SPDLOG_CONSTEXPR_FUNC as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No because the conversion operator for fmt::basic_format_string to fmt::basic_string_view is not constexpr
Merged.Thanks @sylveon |
Now std::format and fmtlib are equivalent when using spdlog with either.