-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Supress -Wfloat-equal on intended float comparisions #2911
Conversation
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.
Don't you need to also suppress the same warning in
friend bool operator==(const_reference lhs, const_reference rhs) noexcept
?
Yes! My compiler did not instantiate that template. I even found one more line that needs a suppression. |
You may also want to check if you now can remove the suppressions in the test suites, because these warnings are now suppressed right in the header:
|
done. |
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.
Thanks! |
Suppress intended float comparison on float values.
gcc 9.3 was complaining with "-Wfloat-equal" which is muted.
Fixes #2909
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.