From 096d7505cfc2d60e58a6dd4d80fd7f3638c9bb94 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 26 Mar 2026 18:19:52 +0100 Subject: kstd/vector: increase test coverage --- libs/kstd/include/kstd/vector | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libs/kstd/include') diff --git a/libs/kstd/include/kstd/vector b/libs/kstd/include/kstd/vector index 74aefa9..771fc87 100644 --- a/libs/kstd/include/kstd/vector +++ b/libs/kstd/include/kstd/vector @@ -548,7 +548,6 @@ namespace kstd if (new_capacity > max_size()) { kstd::os::panic("[kstd:vector] Tried to reserve more space than theoretically possible."); - return; } auto new_data = allocate_n(new_capacity); @@ -690,6 +689,12 @@ namespace kstd return begin() + prefix_size; } + //! Erase an element at a given position. + //! + //! @note This function will panic if position == end() + //! + //! @param position An interator pointing to the element to delete + //! @return An iterator pointing to the element after the deleted element constexpr auto erase(const_iterator position) -> iterator { if (position == end()) -- cgit v1.2.3