diff --git a/tests/src/unit-file_input.cpp b/tests/src/unit-file_input.cpp index f74f23267..ce190dfed 100644 --- a/tests/src/unit-file_input.cpp +++ b/tests/src/unit-file_input.cpp @@ -351,7 +351,7 @@ TEST_CASE("parsing from a FILE*") { CAPTURE(size) std::vector buffer(static_cast(size)); - const file_ptr f = open_with(name, std::string(cbor.begin(), cbor.end())); + const file_ptr f = open_with(name, std::string(reinterpret_cast(cbor.data()), cbor.size())); REQUIRE(f != nullptr); REQUIRE(std::setvbuf(f.get(), buffer.data(), _IOFBF, buffer.size()) == 0); CHECK(json::from_cbor(f.get()) == value);