1
0
Fork 0

Add: subspan function to span

pull/11051/head
Rubidium 2023-06-17 11:59:06 +02:00 committed by rubidium42
parent 7a785a4224
commit 2aa48bfcb3
1 changed files with 6 additions and 0 deletions

View File

@ -96,6 +96,12 @@ public:
constexpr pointer data() const noexcept { return first; }
constexpr span<element_type> subspan(size_t offset, size_t count)
{
assert(offset + count <= size());
return span(this->data() + offset, count);
}
private:
pointer first;
pointer last;