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

🚨 guard GCC pragmas #2924

This commit is contained in:
Niels Lohmann
2021-08-11 23:55:46 +02:00
parent 57d31d1b83
commit e20f3f95eb
4 changed files with 24 additions and 0 deletions

View File

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