[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:
2020-09-07 16:59:21 -07:00
parent 8490472581
commit 71cd7af17b
5 changed files with 102 additions and 15 deletions

View File

@@ -5,22 +5,12 @@
#include <vector>
#include "kutil/linked_list.h"
#include "catch.hpp"
#include "container_helpers.h"
using namespace kutil;
const int test_list_size = 100;
struct unsortableT {
int value;
};
struct sortableT {
int value;
int compare(const sortableT *other) {
return value - other->value;
}
};
template <typename T>
class ListVectorCompare :
public Catch::MatcherBase<std::vector<list_node<T>>>