Add red_black_tree::insert

Former-commit-id: ee58faa944
This commit is contained in:
Henrique Gemignani Passos Lima
2022-10-25 15:50:23 +03:00
parent 4a7fe9a91c
commit b023f939b8
2 changed files with 110 additions and 15 deletions

View File

@@ -14,12 +14,17 @@ public:
typedef pair< K, V > value_type;
private:
typedef red_black_tree< K, value_type, 1, select1st< value_type >, Cmp, Alloc > rep_type;
// TODO: some things use a 0, others use a 1
typedef red_black_tree< K, value_type, 0, select1st< value_type >, Cmp, Alloc > rep_type;
public:
// typedef typename rep_type::iterator iterator;
typedef typename rep_type::const_iterator const_iterator;
void insert(const value_type& item) {
inner.insert(item);
}
private:
rep_type inner;
};