[kutil] Add sorted insert to kutil::vector
Added a sorted insert to vector, as well as cleaning up and extending the removal functions.
This commit is contained in:
13
src/tests/container_helpers.h
Normal file
13
src/tests/container_helpers.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
struct unsortableT {
|
||||
int value;
|
||||
};
|
||||
|
||||
struct sortableT {
|
||||
int value;
|
||||
int compare(const sortableT *other) const {
|
||||
return value - other->value;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user