Improve explicitness of coral::as_bytes memory lifetime

This commit is contained in:
kayomn 2023-02-20 15:00:39 +00:00
parent d6ba17c4ab
commit f2694b61cb
1 changed files with 2 additions and 2 deletions

View File

@ -464,8 +464,8 @@ export namespace coral {
/**
* Returns `value` reinterpreted as a sequence of bytes.
*/
slice<u8 const> as_bytes(auto & value) {
return {reinterpret_cast<u8 const *>(&value), sizeof(value)};
slice<u8 const> as_bytes(auto const * value) {
return {reinterpret_cast<u8 const *>(value), sizeof(value)};
}
/**