mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-03 16:56:17 +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:
@@ -120,9 +120,9 @@ struct Reader {
|
||||
"The BSON subtype must be a binary in order to read into a "
|
||||
"bytestring.");
|
||||
}
|
||||
return rfl::Bytestring(
|
||||
internal::ptr_cast<const std::byte*>(value.v_binary.data),
|
||||
value.v_binary.data_len);
|
||||
const auto data =
|
||||
internal::ptr_cast<const std::byte*>(value.v_binary.data);
|
||||
return rfl::Bytestring(data, data + value.v_binary.data_len);
|
||||
} else if constexpr (std::is_same<std::remove_cvref_t<T>, bool>()) {
|
||||
if (btype != BSON_TYPE_BOOL) {
|
||||
return error("Could not cast to boolean.");
|
||||
|
||||
Reference in New Issue
Block a user