util/HugeAllocator: add std::span cast operator
This commit is contained in:
parent
4262d29965
commit
332ba42073
|
@ -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.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue