From 889f269a6cfb1a29bf48cd444b858947fa4d40e9 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 11 Jul 2020 13:51:25 +0200 Subject: [PATCH] :recycle: replace further alternative operators --- include/nlohmann/detail/output/binary_writer.hpp | 4 ++-- include/nlohmann/json.hpp | 6 +++--- single_include/nlohmann/json.hpp | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) 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 ) {