util/AllocatedArray: add capacity()

For STL completeness.
This commit is contained in:
Max Kellermann 2019-12-09 09:40:18 +01:00 committed by Max Kellermann
parent f8d7bc1c34
commit 2cc1dd28cd

View File

@ -121,6 +121,13 @@ public:
return buffer.size;
}
/**
* Returns the number of allocated elements.
*/
constexpr size_type capacity() const noexcept {
return buffer.size;
}
reference_type front() noexcept {
return buffer.front();
}