Sorting functions correctly took slices by value, but also other types by value. Now, only slices are accepted by value, other containers are always by ref.

This commit is contained in:
Christoffer Lerno
2025-10-07 22:43:40 +02:00
parent d6be1cbf65
commit fe70f10bcc
13 changed files with 346 additions and 125 deletions

View File

@@ -84,7 +84,7 @@ fn void insertionsort_list()
{
InsertionSortTestList list;
list.push_all({ 2, 1, 3});
sort::insertionsort(list, &sort::cmp_int_value);
sort::insertionsort(&list, &sort::cmp_int_value);
assert(check::int_ascending_sort(list.array_view()));
}