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

[MSVC] fmt\chrono.h(206): warning C4127: conditional expression is constant when compiling with /W4 #3149

Closed
np-c0mp1ete opened this issue Oct 20, 2022 · 2 comments

Comments

@np-c0mp1ete
Copy link

np-c0mp1ete commented Oct 20, 2022

Repro:

#include "fmt/chrono.h"

int main() {
    using namespace std::literals::chrono_literals;
    auto args = fmt::make_format_args(5s);
}

The warning was introduced in this PR: #2971

@phprus
Copy link
Contributor

phprus commented Oct 20, 2022

@np-c0mp1ete
Try this fix: phprus@df36b33

@np-c0mp1ete
Copy link
Author

yep, that fixes the warning, thanks!

(didn't notice that the code all around is sprinkled with const_check...)

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

No branches or pull requests

3 participants