mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-06 10:46:18 +08:00
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:
@@ -69,8 +69,8 @@ class Reader {
|
||||
return error("Could not cast to bytestring.");
|
||||
}
|
||||
const auto data = _var.val_.as<capnp::Data>();
|
||||
return rfl::Bytestring(internal::ptr_cast<const std::byte*>(data.begin()),
|
||||
data.size());
|
||||
const auto begin = internal::ptr_cast<const std::byte*>(data.begin());
|
||||
return rfl::Bytestring(begin, begin + data.size());
|
||||
|
||||
} else if constexpr (std::is_same<std::remove_cvref_t<T>, bool>()) {
|
||||
if (type != capnp::DynamicValue::BOOL) {
|
||||
|
||||
Reference in New Issue
Block a user