BAN: Basic containers have shrink_to_fit() method

I also chaged the default memory allocation increase from 1.5 to 2
This commit is contained in:
Bananymous
2023-02-22 02:07:05 +02:00
parent 5d31e89574
commit 4afc4660a4
6 changed files with 84 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ namespace BAN
ErrorOr<void> insert(StringView, size_type);
ErrorOr<void> append(StringView);
ErrorOr<void> append(const String&);
void pop_back();
void remove(size_type);
void erase(size_type, size_type);
@@ -46,6 +46,7 @@ namespace BAN
ErrorOr<void> resize(size_type, char = '\0');
ErrorOr<void> reserve(size_type);
ErrorOr<void> shrink_to_fit();
StringView sv() const;