fix build with llvm-18 by changing Bytestring type to std::vector instead of deprecated std::basic_string<std::byte> (#369)

This commit is contained in:
George Evmenov
2025-03-02 07:23:40 +08:00
committed by GitHub
parent 1da93be27f
commit ec8c19fa3e
11 changed files with 19 additions and 26 deletions
+2 -1
View File
@@ -75,7 +75,8 @@ struct Reader {
if (err) {
return error("Could not cast to bytestring.");
}
return rfl::Bytestring(static_cast<const std::byte*>(ptr), size - 1);
const auto data = internal::ptr_cast<const std::byte*>(ptr);
return rfl::Bytestring(data, data + size - 1);
} else if constexpr (std::is_same<std::remove_cvref_t<T>, bool>()) {
if (type != AVRO_BOOLEAN) {
return rfl::error("Could not cast to boolean.");