diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 54b39ff56..8c0075880 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -4682,7 +4682,7 @@ struct wide_string_input_helper } else { - if (!input.empty()) + if (JSON_HEDLEY_UNLIKELY(not input.empty())) { const auto wc2 = static_cast(input.get_character()); const auto charcode = 0x10000u + (((wc & 0x3FFu) << 10u) | (wc2 & 0x3FFu)); @@ -4821,7 +4821,7 @@ using contiguous_bytes_input_adapter = decltype(input_adapter(std::declval::value and - !std::is_array::value and + not std::is_array::value and std::is_integral::type>::value and sizeof(typename std::remove_pointer::type) == 1, int >::type = 0 > diff --git a/test/src/unit-user_defined_input.cpp b/test/src/unit-user_defined_input.cpp index 06be4e136..86f763d5a 100644 --- a/test/src/unit-user_defined_input.cpp +++ b/test/src/unit-user_defined_input.cpp @@ -98,7 +98,7 @@ TEST_CASE("Custom iterator") { return *ptr; } - + bool operator!=(const MyIterator& rhs) const { return ptr != rhs.ptr;