1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-31 10:24:23 +03:00

Add more suppressions on float comparisons

This commit is contained in:
Sven Fink
2021-08-04 08:34:53 +02:00
parent 095aae19fe
commit 353d59717e
3 changed files with 12 additions and 0 deletions

View File

@ -6278,6 +6278,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
*/
friend bool operator==(const_reference lhs, const_reference rhs) noexcept
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
const auto lhs_type = lhs.type();
const auto rhs_type = rhs.type();
@ -6342,6 +6344,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
}
return false;
#pragma GCC diagnostic pop
}
/*!