diff options
-rw-r--r-- | common/almalloc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/almalloc.h b/common/almalloc.h index 166ac8c9..406c2d31 100644 --- a/common/almalloc.h +++ b/common/almalloc.h @@ -127,6 +127,12 @@ struct FlexArray { T& operator[](size_t i) noexcept { return mArray[i]; } const T& operator[](size_t i) const noexcept { return mArray[i]; } + T& front() noexcept { return mArray[0]; } + const T& front() const noexcept { return mArray[0]; } + + T& back() noexcept { return mArray[mSize-1]; } + const T& back() const noexcept { return mArray[mSize-1]; } + T *begin() noexcept { return mArray; } const T *begin() const noexcept { return mArray; } const T *cbegin() const noexcept { return mArray; } |