-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
Fix C26451 warnnings in to_chars.hpp #1967
Conversation
Is there no way to fix the warning? |
From #1969 (comment), i agree with @MBalszun . But if you dont want this, i will take a new version out. |
Assuming this warning needs to be tackled at all and not suppressed, wouldn't it be easiest to just turn k and n into variables of |
Good idea. No, it is not ok for
which raises ...possible loss of data .
It is wried if we change |
Ready to go. |
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.
Looks good to me.
🔖 Release itemThis issue/PR will be part of the next release of the library. This template helps preparing the release notes. Type
Description
|
Thanks! |
Refer to #1911
In
to_chars.hpp
, there were asserts before operator-
.This PR will disable warning C26451.
Pull request checklist
Read the Contribution Guidelines for detailed information.
include/nlohmann
directory, runmake amalgamate
to create the single-header filesingle_include/nlohmann/json.hpp
. The whole process is described here.Please don't
#ifdef
s or other means.