-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
call to non-constexpr function #1811
Comments
are you using C++11 or older? And are you using compiled or header only version or spdlog? Please give the full error output. I suspect this could be coming from constructor Ideally the flags should be changed in fmt function declarations. If you switch to C++ 17 this will not be a problem. |
change the #if __cplusplus >= 201402L at line 13 in common-inl.h to #if __cplusplus >= 201703L works. Thank you. |
After I pull the latest spdlog and recompile it, my code cannot compile.
/opt/spdlog/include/spdlog/common-inl.h:16:43: error: call to non-constexpr function 'fmt::v7::basic_string_view<Char>::basic_string_view(const Char*) [with Char = char]' static string_view_t level_string_views[] SPDLOG_LEVEL_NAMES;
And I checkout to the commit before #1798, there is no error. Does this pull request cause the problem? @gv-me
Even something like
logger->info("{0}",idx);
connot pass the compilation whereidx
is an int.The text was updated successfully, but these errors were encountered: