Commit 2cc1dd28 authored by Max Kellermann's avatar Max Kellermann Committed by Max Kellermann

util/AllocatedArray: add capacity()

For STL completeness.
parent f8d7bc1c
...@@ -121,6 +121,13 @@ public: ...@@ -121,6 +121,13 @@ public:
return buffer.size; return buffer.size;
} }
/**
* Returns the number of allocated elements.
*/
constexpr size_type capacity() const noexcept {
return buffer.size;
}
reference_type front() noexcept { reference_type front() noexcept {
return buffer.front(); return buffer.front();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment