diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 2a3172139..6474b8b05 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -75,7 +75,7 @@ class binary_reader @param[in] adapter input adapter to read from */ - explicit binary_reader(InputAdapterType&& adapter, const input_format_t format = input_format_t::json) noexcept : input_format(format), ia(std::move(adapter)) + explicit binary_reader(InputAdapterType&& adapter, const input_format_t format = input_format_t::json) noexcept : ia(std::move(adapter)), input_format(format) { (void)detail::is_sax_static_asserts {}; } diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index b7f63ff37..bb44a1811 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -1614,7 +1614,7 @@ class binary_writer }; string_t key = "_ArrayType_"; - auto it = bjdtype.find(value.at(key)); + auto it = bjdtype.find(static_cast(value.at(key))); if (it == bjdtype.end()) { return true; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index c4daa1e83..d596180c6 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -8451,7 +8451,7 @@ class binary_reader @param[in] adapter input adapter to read from */ - explicit binary_reader(InputAdapterType&& adapter, const input_format_t format = input_format_t::json) noexcept : input_format(format), ia(std::move(adapter)) + explicit binary_reader(InputAdapterType&& adapter, const input_format_t format = input_format_t::json) noexcept : ia(std::move(adapter)), input_format(format) { (void)detail::is_sax_static_asserts {}; } @@ -15512,7 +15512,7 @@ class binary_writer }; string_t key = "_ArrayType_"; - auto it = bjdtype.find(value.at(key)); + auto it = bjdtype.find(static_cast(value.at(key))); if (it == bjdtype.end()) { return true;