:construction_worker: build ci_module_cpp20 with MSVC Signed-off-by: Niels Lohmann <mail@nlohmann.me>
diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index ed51cd5..2e0b688 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp
@@ -39,6 +39,7 @@ #include <nlohmann/detail/hash.hpp> #include <nlohmann/detail/input/binary_reader.hpp> #include <nlohmann/detail/input/input_adapters.hpp> +#include <nlohmann/detail/input/json_sax.hpp> #include <nlohmann/detail/input/lexer.hpp> #include <nlohmann/detail/input/parser.hpp> #include <nlohmann/detail/iterators/internal_iterator.hpp>
diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 850cd8e..125520b 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp
@@ -12889,6 +12889,8 @@ // #include <nlohmann/detail/input/input_adapters.hpp> +// #include <nlohmann/detail/input/json_sax.hpp> + // #include <nlohmann/detail/input/lexer.hpp> // #include <nlohmann/detail/input/parser.hpp>
diff --git a/tests/src/unit-msgpack.cpp b/tests/src/unit-msgpack.cpp index bfea2dc..2a841d0 100644 --- a/tests/src/unit-msgpack.cpp +++ b/tests/src/unit-msgpack.cpp
@@ -1914,10 +1914,12 @@ SECTION("empty vector") { const std::vector<std::byte> empty_data; - CHECK_THROWS_WITH_AS([&]() { - [[maybe_unused]] auto result = json::from_msgpack(empty_data); - return true; - }(), + CHECK_THROWS_WITH_AS([&]() + { + [[maybe_unused]] auto result = json::from_msgpack(empty_data); + return true; + } + (), "[json.exception.parse_error.110] parse error at byte 1: syntax error while parsing MessagePack value: unexpected end of input", json::parse_error&); } @@ -1946,8 +1948,8 @@ json direct_result = json::from_msgpack(msgpack_data); // Test the workaround approach: reinterpret as unsigned char* and use iterator range - const auto *const char_start = reinterpret_cast<unsigned char const*>(msgpack_data.data()); - const auto *const char_end = char_start + msgpack_data.size(); + const auto* const char_start = reinterpret_cast<unsigned char const*>(msgpack_data.data()); + const auto* const char_end = char_start + msgpack_data.size(); json workaround_result = json::from_msgpack(char_start, char_end); // Verify that the final deserialized JSON matches the original JSON