summaryrefslogtreecommitdiff
path: root/src/support/small_vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/small_vector.h')
-rw-r--r--src/support/small_vector.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/support/small_vector.h b/src/support/small_vector.h
index 8ab10c05b..e2c865b8f 100644
--- a/src/support/small_vector.h
+++ b/src/support/small_vector.h
@@ -119,6 +119,14 @@ public:
}
}
+ void reserve(size_t reservedSize) {
+ if (reservedSize > N) {
+ flexible.reserve(reservedSize - N);
+ }
+ }
+
+ size_t capacity() const { return N + flexible.capacity(); }
+
bool operator==(const SmallVector<T, N>& other) const {
if (usedFixed != other.usedFixed) {
return false;