diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index 7db69ac2..e4207312 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -1497,8 +1497,8 @@ class binary_writer void write_compact_float(const number_float_t n, detail::input_format_t format) { - if (static_cast(n) >= static_cast(std::numeric_limits::lowest()) and - static_cast(n) <= static_cast((std::numeric_limits::max)()) and + if (static_cast(n) >= static_cast(std::numeric_limits::lowest()) && + static_cast(n) <= static_cast((std::numeric_limits::max)()) && static_cast(static_cast(n)) == static_cast(n)) { oa->write_character(format == detail::input_format_t::cbor diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 3f38a6f0..95347a5b 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -5883,9 +5883,9 @@ class basic_json @since version 1.0.0 */ friend void swap(reference left, reference right) noexcept ( - std::is_nothrow_move_constructible::value and - std::is_nothrow_move_assignable::value and - std::is_nothrow_move_constructible::value and + std::is_nothrow_move_constructible::value&& + std::is_nothrow_move_assignable::value&& + std::is_nothrow_move_constructible::value&& std::is_nothrow_move_assignable::value ) { diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index e0652628..595bc24b 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -13825,8 +13825,8 @@ class binary_writer void write_compact_float(const number_float_t n, detail::input_format_t format) { - if (static_cast(n) >= static_cast(std::numeric_limits::lowest()) and - static_cast(n) <= static_cast((std::numeric_limits::max)()) and + if (static_cast(n) >= static_cast(std::numeric_limits::lowest()) && + static_cast(n) <= static_cast((std::numeric_limits::max)()) && static_cast(static_cast(n)) == static_cast(n)) { oa->write_character(format == detail::input_format_t::cbor @@ -21779,9 +21779,9 @@ class basic_json @since version 1.0.0 */ friend void swap(reference left, reference right) noexcept ( - std::is_nothrow_move_constructible::value and - std::is_nothrow_move_assignable::value and - std::is_nothrow_move_constructible::value and + std::is_nothrow_move_constructible::value&& + std::is_nothrow_move_assignable::value&& + std::is_nothrow_move_constructible::value&& std::is_nothrow_move_assignable::value ) {