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.
|
* Returns `value` reinterpreted as a sequence of bytes.
|
||||||
*/
|
*/
|
||||||
slice<u8 const> as_bytes(auto & value) {
|
slice<u8 const> as_bytes(auto const * value) {
|
||||||
return {reinterpret_cast<u8 const *>(&value), sizeof(value)};
|
return {reinterpret_cast<u8 const *>(value), sizeof(value)};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue