feat(util/rb_tree): add unsigned_rev_cmp
This commit is contained in:
parent
048376d8fd
commit
889bdec2f7
1 changed files with 3 additions and 0 deletions
|
|
@ -483,6 +483,9 @@ rb_tree<T, CMP> erase(rb_tree<T, CMP> const & t, T const & v) { rb_tree<T, CMP>
|
|||
struct unsigned_cmp {
|
||||
int operator()(unsigned i1, unsigned i2) const { return i1 < i2 ? -1 : (i1 == i2 ? 0 : 1); }
|
||||
};
|
||||
struct unsigned_rev_cmp {
|
||||
int operator()(unsigned i1, unsigned i2) const { return i1 > i2 ? -1 : (i1 == i2 ? 0 : 1); }
|
||||
};
|
||||
struct int_cmp {
|
||||
int operator()(int i1, int i2) const { return i1 < i2 ? -1 : (i1 == i2 ? 0 : 1); }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue