Improve explicitness of coral::as_bytes memory lifetime
This commit is contained in:
parent
d6ba17c4ab
commit
f2694b61cb
|
@ -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)};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue