Skip to content

Commit 9409f4a

Browse files
committed
Fix assert being hit in testing
1 parent 20b47f5 commit 9409f4a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/include/gch/small_vector.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3198,8 +3198,9 @@ namespace gch
31983198

31993199
if (InlineCapacity < other.get_size ())
32003200
{
3201+
// Note: We use `allocate_with_hint` here to bypass the assert in `unchecked_allocate`.
32013202
const size_ty new_capacity = other.get_size ();
3202-
const ptr new_data_ptr = other.unchecked_allocate (
3203+
const ptr new_data_ptr = other.allocate_with_hint (
32033204
new_capacity,
32043205
other.allocation_end_ptr ());
32053206

0 commit comments

Comments
 (0)