Skip to content

Commit 645dbf9

Browse files
Merge pull request #956 from PowerGridModel/fix-xcode16.3
Fix MacOS build for Xcode 16.3
2 parents 6a09c99 + c3609a8 commit 645dbf9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/native_api_tests/test_api_serialization.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
#include <vector>
1616

1717
namespace power_grid_model_cpp {
18-
1918
namespace {
20-
2119
using namespace std::string_literals;
2220

2321
constexpr char const* json_data =
@@ -83,7 +81,9 @@ TEST_CASE("API Serialization and Deserialization") {
8381
SUBCASE("Round trip") {
8482
std::vector<std::byte> msgpack_data{};
8583
msgpack_serializer.get_to_binary_buffer(0, msgpack_data);
86-
auto const json_document = nlohmann::ordered_json::from_msgpack(msgpack_data);
84+
auto const char_start = reinterpret_cast<unsigned char const*>(msgpack_data.data());
85+
auto const char_end = char_start + msgpack_data.size();
86+
auto const json_document = nlohmann::ordered_json::from_msgpack(char_start, char_end);
8787
auto const json_result = json_document.dump(-1);
8888
CHECK(json_result == json_data);
8989
}

0 commit comments

Comments
 (0)