util/HugeAllocator: add std::span cast operator
This commit is contained in:
@@ -181,6 +181,14 @@ public:
|
|||||||
return buffer != nullptr;
|
return buffer != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr operator std::span<T>() noexcept {
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr operator std::span<const T>() noexcept {
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of allocated elements.
|
* Returns the number of allocated elements.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user