Add an iterator type to kutil::map, and allow for each loops. Also unify the compare() signature expected by sorting containers, and fixes to adding and sorting in kutil::vector.
14 lines
164 B
C
14 lines
164 B
C
#pragma once
|
|
|
|
struct unsortableT {
|
|
int value;
|
|
};
|
|
|
|
struct sortableT {
|
|
int value;
|
|
int compare(const sortableT &other) const {
|
|
return value - other.value;
|
|
}
|
|
};
|
|
|