On Sunday, 7 June 2015 at 19:11:25 UTC, anonymous wrote:
On Sunday, 7 June 2015 at 19:04:08 UTC, Dennis Ritchie wrote:
auto rbt = redBlackTree!("a <= b", int)(1, 2, 3, 4, 5);
writeln(rbt.upperBound(3)); // prints [3, 4, 5]

How do I do with the comparator "a < b" ?

Use equalRange to get the elements that equal 3, too:
writeln(std.range.chain(rbt.equalRange(3), rbt.upperBound(3)));

Thank you!

Reply via email to