I understand that `removeKey` works only with the comparator "a < b":
http://dlang.org/phobos/std_container_rbtree.html#.RedBlackTree.removeKey
Removes elements from the container that are equal to the given values according to the less comparator.

How do I remove the key from the `redBlackTree` with comparator "a <= b" ?

auto rbt = redBlackTree!("a <= b", int)(1, 2, 3, 4, 5, 6, 7);
rbt.removeKey(6);

foreach (key; rbt)
    write(key);
// prints 1234567

Reply via email to